|
@@ -219,7 +219,7 @@
|
|
|
<el-table-column label="预留数量" align="center" prop="reservedQty" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
- <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.reservedQty"/>
|
|
|
+ <el-input readonly size="small" v-model="scope.row.reservedQty"/>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -332,7 +332,7 @@
|
|
|
<el-table-column label="收货仓库" align="center" prop="deliveryWarehouseName" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
|
|
|
+ <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
|
|
|
<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>
|
|
@@ -341,7 +341,7 @@
|
|
|
<el-table-column label="收货货位" align="center" prop="deliveryAllocationName" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
|
|
|
+ <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
|
|
|
<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>
|
|
@@ -364,7 +364,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="默认采购组织" align="center" prop="purOrgName" width="200px"/>
|
|
|
+ <el-table-column label="默认采购组织" align="center" prop="purOrgName" width="200px"/>yu
|
|
|
<el-table-column label="默认采购组织编码" align="center" prop="puOrg" width="200px"/>
|
|
|
<!-- <el-table-column label="末级供应调拨待入量" align="center" prop="lastStockQty" width="150px"/> -->
|
|
|
<!-- <el-table-column label="上级供应中心现存量" align="center" prop="superiorCenterQty" width="200px"/> -->
|
|
@@ -387,8 +387,8 @@
|
|
|
<el-table-column label="补单供应商编码" align="center" prop="additionalSupplier" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.additionalSupplier" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
|
|
|
+ <el-input clearable :disabled="sonDisable || BDZT" size="small" v-model="scope.row.additionalSupplier" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
|
|
|
+ <el-button size="small" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -416,7 +416,7 @@
|
|
|
<el-table-column label="收货地址" align="center" prop="deliveryAddressName" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item class="hang">
|
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
|
|
|
+ <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
|
|
|
<el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -500,6 +500,8 @@ export default {
|
|
|
// 不能直接改变props传来的值
|
|
|
sonPageStu: this.pageStu,
|
|
|
sonDisable: this.disable,
|
|
|
+ // BDZT是补单供应商是否可以编辑条件
|
|
|
+ BDZT: true,
|
|
|
dialog: {
|
|
|
config: false
|
|
|
},
|
|
@@ -560,9 +562,15 @@ export default {
|
|
|
// 更改业务类型调整明细行内补单或紧急标识
|
|
|
changeBillType() {
|
|
|
if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
|
|
|
+ this.BDZT = false
|
|
|
this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
|
|
|
} else {
|
|
|
- this.basicForm.puDemandItemList.forEach(item => { item.isReplenishment = 'N' })
|
|
|
+ this.BDZT = true
|
|
|
+ this.basicForm.puDemandItemList.forEach(item => {
|
|
|
+ item.isReplenishment = 'N'
|
|
|
+ item.additionalSupplier = null
|
|
|
+ item.additionalSupplierName = null
|
|
|
+ })
|
|
|
}
|
|
|
if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
|
|
|
this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
|
|
@@ -650,8 +658,6 @@ export default {
|
|
|
status: null,
|
|
|
businessDept: null,
|
|
|
businessDeptName: null,
|
|
|
- customer: this.basicForm.customer,
|
|
|
- customerName: this.basicForm.customerName,
|
|
|
materialCategory: null,
|
|
|
buyer: null,
|
|
|
buyerName: null,
|
|
@@ -717,8 +723,8 @@ export default {
|
|
|
additionalSupplier: null,
|
|
|
additionalSupplierName: null,
|
|
|
periodUnit: null,
|
|
|
- demandCustomer: null,
|
|
|
- demandCustomerName: null,
|
|
|
+ demandCustomer: this.basicForm.customer,
|
|
|
+ demandCustomerName: this.basicForm.customerName,
|
|
|
lastStockOrg: null,
|
|
|
lastStockOrgName: null,
|
|
|
superiorStockOrg: null,
|
|
@@ -855,7 +861,7 @@ export default {
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = selection[0].name
|
|
|
}
|
|
|
if(this.referConditionMx.title == '选择补单供应商') {
|
|
|
- this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = selection[0].id
|
|
|
+ this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = selection[0].code
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].additionalSupplierName = selection[0].name
|
|
|
}
|
|
|
if(this.referConditionMx.title == '选择收货地址') {
|
|
@@ -958,7 +964,27 @@ export default {
|
|
|
} else {
|
|
|
this.$modal.msgWarning("请先选择收货仓库");
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 明细行清空收货仓库,货位,收货地址档案等
|
|
|
+ clearHang(index, title) {
|
|
|
+ if (title == '选择收货仓库') {
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryWarehouseName = null
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryWarehouse = null
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAllocationName = null
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAllocation = null
|
|
|
+ }
|
|
|
+ if (title == '选择收货货位') {
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAllocationName = null
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAllocation = null
|
|
|
+ }
|
|
|
+ if (title == '选择收货地址') {
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAddressName = null
|
|
|
+ this.basicForm.puDemandItemList[index].deliveryAddress = null
|
|
|
+ this.basicForm.puDemandItemList[index].contacts = null
|
|
|
+ this.basicForm.puDemandItemList[index].contactsPhone = null
|
|
|
+ this.basicForm.puDemandItemList[index].address = null
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|