|
@@ -85,7 +85,7 @@
|
|
|
<el-form-item label="需求日期">
|
|
|
<el-date-picker
|
|
|
v-model="basicForm.demandDate"
|
|
|
- disabled
|
|
|
+ :disabled="sonDisable"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
size="small"
|
|
@@ -104,22 +104,6 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-form-item label="供应仓库">
|
|
|
- <el-select size="small" v-model="basicForm.warehouse" :disabled="sonDisable" @focus="chooseOrg('WAREHOUSE_PARAM', true, '供应仓库')" style="width: 200px">
|
|
|
- <el-option v-for="item in houseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-form-item label="供应货位">
|
|
|
- <el-select size="small" v-model="basicForm.goodsAllocation" :disabled="sonDisable" @focus="chooseOrg('ALLOCATION_PARAM', true, '供应货位')" style="width: 200px">
|
|
|
- <el-option v-for="item in goodsOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="业务类型">
|
|
|
<el-select v-model="basicForm.billType" :disabled="sonDisable" size="small" style="width: 200px">
|
|
@@ -151,20 +135,9 @@
|
|
|
</el-col> -->
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
- <el-form-item label="是否月销量计算">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.isMonthleyCalculate"
|
|
|
- size="small"
|
|
|
- disabled
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="1.5">
|
|
|
<el-form-item label="备注">
|
|
|
<el-input
|
|
|
- v-model="basicForm.remark"
|
|
|
+ v-model.trim="basicForm.remark"
|
|
|
size="small"
|
|
|
:disabled="sonDisable"
|
|
|
clearable
|
|
@@ -193,22 +166,9 @@
|
|
|
<el-table-column label="序号" type="index" align="center"/>
|
|
|
<el-table-column label="行状态" align="center" prop="status" :formatter="hangStatus"/>
|
|
|
<el-table-column label="行号" align="center" prop="rowNo" />
|
|
|
- <el-table-column label="业务部门名称" align="center" width="180px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item class="hang">
|
|
|
- <el-input readonly size="small" v-model="scope.row.businessDeptName"/>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="业务部门" align="center" width="180px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item class="hang">
|
|
|
- <el-input readonly size="small" v-model="scope.row.businessDept">
|
|
|
- <!-- <el-button :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'DEPT_PARAM', true, '选择部门')"></el-button> -->
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <!-- <el-table-column label="业务部门名称" align="center" width="180px"/> -->
|
|
|
+ <!-- <el-table-column label="业务部门" align="center" width="180px"/> -->
|
|
|
+ <el-table-column label="需求客户" align="center" prop="customerName"/>
|
|
|
<el-table-column label="一级品类" align="center" prop="materialClassifyOneName" width="180px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
@@ -367,15 +327,6 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="末级供应仓库" align="center" prop="lastWarehouseName" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item class="hang">
|
|
|
- <el-input readonly size="small" v-model="scope.row.lastWarehouseName">
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择末级供应仓库')"></el-button>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="收货仓库" align="center" prop="deliveryWarehouseName" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
@@ -385,25 +336,18 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="末级供应货位" align="center" prop="lastAllocationName" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item class="hang">
|
|
|
- <el-input readonly size="small" v-model="scope.row.lastAllocationName">
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ALLOCATION_PARAM', true, '选择末级供应货位')"></el-button>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="收货货位编码" align="center" prop="deliveryAllocation" width="200px"/>
|
|
|
<el-table-column label="收货货位" align="center" prop="deliveryAllocationName" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
<el-input readonly size="small" v-model="scope.row.deliveryAllocationName">
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位')"></el-button>
|
|
|
+ <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- <el-table-column label="收货货位编码" align="center" prop="deliveryAllocation" width="200px"/> -->
|
|
|
+ <el-table-column label="末级供应仓库" align="center" prop="lastWarehouseName" width="200px"/>
|
|
|
+ <el-table-column label="末级供应货位" align="center" prop="lastAllocationName" width="200px"/>
|
|
|
<el-table-column label="紧急标识" align="center" prop="isUrgency" width="100px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
@@ -471,13 +415,6 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="需求客户" align="center" prop="customer">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item class="hang">
|
|
|
- <el-input v-model="scope.row.customer"/>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column label="末级供应库存组织" align="center" prop="superiorStockOrgName" width="200px"></el-table-column>
|
|
|
<el-table-column label="中心仓可用量" align="center" prop="updateTime" width="200px"></el-table-column>
|
|
|
<el-table-column label="调拨单号" align="center" prop="allotCode"></el-table-column>
|
|
@@ -584,9 +521,7 @@ export default {
|
|
|
demandPersonal: '',
|
|
|
demandDept: '',
|
|
|
demandDate: '',
|
|
|
- source: '1',
|
|
|
- warehouse: '',
|
|
|
- goodsAllocation: '',
|
|
|
+ source: '4',
|
|
|
billType: '',
|
|
|
isSpeical: '',
|
|
|
isProcess: '',
|
|
@@ -595,30 +530,27 @@ export default {
|
|
|
puDemandItemList: []
|
|
|
},
|
|
|
options: [{
|
|
|
- value: '0', label: '是',
|
|
|
+ value: 'Y', label: '是',
|
|
|
}, {
|
|
|
- value: '2', label: '否'
|
|
|
+ value: 'N', label: '否'
|
|
|
}],
|
|
|
basicRules: {},
|
|
|
tableList: [],
|
|
|
referCondition: {
|
|
|
- type: 'ORG_PARAM',
|
|
|
+ type: '',
|
|
|
isPage: true,
|
|
|
- title: '选择组织',
|
|
|
- pkOrg: '',
|
|
|
+ title: '',
|
|
|
},
|
|
|
referConditionMx: {
|
|
|
- type: 'DEPT_PARAM',
|
|
|
+ type: '',
|
|
|
isPage: true,
|
|
|
- title: '选择部门'
|
|
|
+ title: '',
|
|
|
},
|
|
|
tableIndex: null,
|
|
|
orgOptions: [],
|
|
|
personOptions: [],
|
|
|
deptOptions: [],
|
|
|
customerOptions: [],
|
|
|
- houseOptions: [],
|
|
|
- goodsOptions: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -706,6 +638,8 @@ export default {
|
|
|
status: null,
|
|
|
businessDept: null,
|
|
|
businessDeptName: null,
|
|
|
+ customer: this.basicForm.customer,
|
|
|
+ customerName: this.basicForm.customerName,
|
|
|
materialCategory: null,
|
|
|
buyer: null,
|
|
|
buyerName: null,
|
|
@@ -800,6 +734,8 @@ export default {
|
|
|
delFlag: null,
|
|
|
// 新增字段
|
|
|
model: null,
|
|
|
+ storageCondition: null,
|
|
|
+ transportationCondition: null,
|
|
|
}
|
|
|
this.basicForm.puDemandItemList.push(newLine)
|
|
|
},
|
|
@@ -834,10 +770,8 @@ export default {
|
|
|
if(this.basicForm.customer) { this.reBackRefer('CUSTOMER_PARAM', this.basicForm.customer) }
|
|
|
if(this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal) }
|
|
|
if(this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
|
|
|
- if(this.basicForm.warehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.warehouse) }
|
|
|
- if(this.basicForm.goodsAllocation) { this.reBackRefer('ALLOCATION_PARAM', this.basicForm.goodsAllocation) }
|
|
|
+ // 详情时将收货仓库id赋值给stordocId
|
|
|
}
|
|
|
- console.log('111')
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -866,20 +800,12 @@ export default {
|
|
|
if (type == 'DEPT_PARAM') {
|
|
|
this.deptOptions = res.rows
|
|
|
}
|
|
|
- if (type == 'WAREHOUSE_PARAM') {
|
|
|
- this.houseOptions = res.rows
|
|
|
- }
|
|
|
- if (type == 'ALLOCATION_PARAM') {
|
|
|
- this.goodsOptions = res.rows
|
|
|
- }
|
|
|
})
|
|
|
},
|
|
|
chooseOrg(type, isPage, title) {
|
|
|
this.referCondition.type = type
|
|
|
this.referCondition.isPage = isPage
|
|
|
this.referCondition.title = title
|
|
|
- // 选择货位时要传入组织id
|
|
|
- this.referCondition.pkOrg = this.basicForm.org
|
|
|
this.$refs.refer.init(this.referCondition)
|
|
|
},
|
|
|
selectionsToInput(selection) {
|
|
@@ -902,29 +828,16 @@ export default {
|
|
|
this.deptOptions = selection
|
|
|
this.basicForm.demandDept = selection[0].id
|
|
|
}
|
|
|
- if(this.referCondition.type == 'WAREHOUSE_PARAM') {
|
|
|
- this.houseOptions = selection
|
|
|
- this.basicForm.warehouse = selection[0].id
|
|
|
- }
|
|
|
- if(this.referCondition.type == 'ALLOCATION_PARAM') {
|
|
|
- this.goodsOptions = selection
|
|
|
- this.basicForm.goodsAllocation = selection[0].id
|
|
|
- }
|
|
|
// if(this.referConditionMx.type == 'DEPT_PARAM') {
|
|
|
// this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].code
|
|
|
// this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].name
|
|
|
// }
|
|
|
- if(this.referConditionMx.title == '选择末级供应仓库') {
|
|
|
- this.basicForm.puDemandItemList[this.tableIndex].lastWarehouseName = selection[0].name
|
|
|
- }
|
|
|
if(this.referConditionMx.title == '选择收货仓库') {
|
|
|
+ this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = selection[0].name
|
|
|
}
|
|
|
- if(this.referConditionMx.title == '选择末级供应货位') {
|
|
|
- this.basicForm.puDemandItemList[this.tableIndex].lastAllocationName = selection[0].name
|
|
|
- }
|
|
|
if(this.referConditionMx.title == '选择收货货位') {
|
|
|
- this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = selection[0].code
|
|
|
+ this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = selection[0].id
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = selection[0].name
|
|
|
}
|
|
|
if(this.referConditionMx.title == '选择补单供应商') {
|
|
@@ -943,7 +856,8 @@ export default {
|
|
|
chooseMaterial(index) {
|
|
|
console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index)
|
|
|
this.tableIndex = index
|
|
|
- this.$refs.materialRefer.init()
|
|
|
+ // 传0只展示同步NC了的物料
|
|
|
+ this.$refs.materialRefer.init(0)
|
|
|
},
|
|
|
selectMaterial(selection) {
|
|
|
console.log('选中的物料', selection)
|
|
@@ -979,6 +893,9 @@ export default {
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].safeStock = selection[0].safeStock
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].purOrgName = selection[0].purchasingOrganizationName
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].puOrg = selection[0].purchasingOrganization
|
|
|
+ // 物料存储条件和运输条件
|
|
|
+ this.basicForm.puDemandItemList[this.tableIndex].transportationCondition = selection[0].transportationCondition
|
|
|
+ this.basicForm.puDemandItemList[this.tableIndex].storageCondition = selection[0].storageCondition
|
|
|
},
|
|
|
// 明细行选择业务部门参照带出业务部门数据
|
|
|
chooseDept(index, type, isPage, title) {
|
|
@@ -987,6 +904,20 @@ export default {
|
|
|
this.referConditionMx.isPage = isPage
|
|
|
this.referConditionMx.title = title
|
|
|
this.$refs.refer.init(this.referConditionMx)
|
|
|
+ },
|
|
|
+ // 明细行选择业务部门参照带出业务部门数据
|
|
|
+ choosehuoWei(index, type, isPage, title, stordocId) {
|
|
|
+ this.tableIndex = index
|
|
|
+ this.referConditionMx.type = type
|
|
|
+ this.referConditionMx.isPage = isPage
|
|
|
+ this.referConditionMx.title = title
|
|
|
+ // 选择收货货位前先选择收货仓库
|
|
|
+ if(stordocId) {
|
|
|
+ this.referConditionMx.stordocId = stordocId
|
|
|
+ this.$refs.refer.init(this.referConditionMx)
|
|
|
+ } else {
|
|
|
+ this.$modal.msgWarning("请先选择收货仓库");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|