|
@@ -11,17 +11,6 @@
|
|
|
<el-input v-model="dataForm.recordCode" :disabled="true" placeholder="编码系统自动生成"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="padding-left: 20px">
|
|
|
- <el-form-item label="入库申请人" prop="userId">
|
|
|
- <el-input v-if="display" v-model="dataForm.applicant" :disabled="true"/>
|
|
|
- <user-component v-else v-model="dataForm.userId" @userSelected="userChanged"></user-component>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8" style="padding-left: 20px">
|
|
|
- <el-form-item label="申请人部门" prop="orgName">
|
|
|
- <el-input :disabled="true" v-model="dataForm.orgName" placeholder="自动匹配"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
<template v-for="(item, index) in dataList">
|
|
|
<div :key="index" class="my-line">
|
|
@@ -150,16 +139,10 @@
|
|
|
<script>
|
|
|
import UserComponent from '../common/user-component'
|
|
|
import DictSelect from '../sys/dict-select'
|
|
|
- import { getUserInfo } from '@/api/user'
|
|
|
import { getMaterialList, getConversionList, inboundBatch, getBoundDetails, getMaterialTypes } from '@/api/warehouse'
|
|
|
export default {
|
|
|
name: 'stock-order-inbound',
|
|
|
components: {DictSelect, UserComponent},
|
|
|
- computed: {
|
|
|
- orgId: {
|
|
|
- get () { return this.$store.state.user.orgId }
|
|
|
- }
|
|
|
- },
|
|
|
data () {
|
|
|
return {
|
|
|
visible: false,
|
|
@@ -188,7 +171,6 @@
|
|
|
// 获取详情
|
|
|
await getBoundDetails(id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
- console.log('data = ' + JSON.stringify(data.data))
|
|
|
if (data.data[0]) {
|
|
|
this.dataForm = {
|
|
|
recordCode: data.data[0].recordCode,
|
|
@@ -253,14 +235,15 @@
|
|
|
materialName: item.materialName ? item.materialName : item.materialId,
|
|
|
materialTypeId: item.materialTypeId ? item.materialTypeId : item.cateId,
|
|
|
notes: item.notes,
|
|
|
- orgId: this.orgId,
|
|
|
+ orgId: this.$store.state.user.orgId,
|
|
|
price: item.price,
|
|
|
recordCode: this.dataForm.recordCode,
|
|
|
recordType: this.dataForm.recordType,
|
|
|
source: item.source,
|
|
|
specifications: item.specifications,
|
|
|
unitName: item.unitName,
|
|
|
- unitNeedChange: item.unitNeedChange
|
|
|
+ unitNeedChange: item.unitNeedChange,
|
|
|
+ userId: this.$store.state.user.id
|
|
|
})
|
|
|
})
|
|
|
inboundBatch(postData).then(({data}) => {
|
|
@@ -284,16 +267,6 @@
|
|
|
validateField (type) {
|
|
|
this.$refs.dataForm.validateField(type)
|
|
|
},
|
|
|
- userChanged (userId) {
|
|
|
- getUserInfo(userId).then(({data}) => {
|
|
|
- if (data && data.code === '200') {
|
|
|
- this.dataForm.orgId = data.data.orgId
|
|
|
- this.dataForm.orgName = data.data.orgName
|
|
|
- } else {
|
|
|
- this.$message.error(data.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 远程方法:货物种类
|
|
|
async remoteMaterialTypes (query) {
|
|
|
if (!query) return
|