|
@@ -4,7 +4,7 @@
|
|
<el-row :gutter="10">
|
|
<el-row :gutter="10">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="调出库存组织">
|
|
<el-form-item label="调出库存组织">
|
|
- <el-select clearable size="small" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
|
|
<el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -36,6 +36,7 @@
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
type="date"
|
|
type="date"
|
|
clearable
|
|
clearable
|
|
|
|
+ @change="changeBillDate"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 200px">
|
|
style="width: 200px">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -73,7 +74,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="调入库存组织">
|
|
<el-form-item label="调入库存组织">
|
|
- <el-select clearable size="small" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
|
|
<el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -87,7 +88,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="调出部门">
|
|
<el-form-item label="调出部门">
|
|
- <el-select clearable size="small" v-model="basicForm.deliveryDept" :disabled="sonDisable" @focus="chooseRefer('DEPT_PARAM', true, '调出部门', basicForm.deliveryInventoryOrg)" style="width: 200px">
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.deliveryDept" :disabled="sonDisable || isOrg" @focus="chooseRefer('DEPT_PARAM', true, '调出部门', basicForm.deliveryInventoryOrg)" style="width: 200px">
|
|
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -158,14 +159,14 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="调入仓库">
|
|
<el-form-item label="调入仓库">
|
|
- <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable || isOrg" @change="controlDRHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
|
|
<el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="调出仓库">
|
|
<el-form-item label="调出仓库">
|
|
- <el-select clearable size="small" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库')" style="width: 200px">
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg)" style="width: 200px">
|
|
<el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -271,8 +272,8 @@
|
|
<el-table-column show-overflow-tooltip label="调出货位" align="center" prop="deliveryAllocationName" width="230px">
|
|
<el-table-column show-overflow-tooltip label="调出货位" align="center" prop="deliveryAllocationName" width="230px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item class="hang">
|
|
<el-form-item class="hang">
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)">
|
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)"></el-button>
|
|
|
|
|
|
+ <el-input clearable :disabled="sonDisable || isDCCk" size="small" v-model="scope.row.deliveryAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)">
|
|
|
|
+ <el-button size="small" :disabled="sonDisable || isDCCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
@@ -289,8 +290,8 @@
|
|
<el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName" width="230px">
|
|
<el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName" width="230px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item class="hang">
|
|
<el-form-item class="hang">
|
|
- <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.storageAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)">
|
|
|
|
- <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)"></el-button>
|
|
|
|
|
|
+ <el-input clearable :disabled="sonDisable || isDRCk" size="small" v-model="scope.row.storageAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)">
|
|
|
|
+ <el-button size="small" :disabled="sonDisable || isDRCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
@@ -704,7 +705,10 @@ export default {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ isOrg: true,
|
|
|
|
+ isDRCk: true,
|
|
|
|
+ isDCCk: true,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -716,6 +720,43 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 改变单据日期时清空子表的调拨日期
|
|
|
|
+ changeBillDate() {
|
|
|
|
+ this.materialInfo.forEach(item => {
|
|
|
|
+ item.allotDate = null
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
|
|
|
|
+ controlCk() {
|
|
|
|
+ console.log('进了吗')
|
|
|
|
+ if (this.basicForm.deliveryInventoryOrg && this.basicForm.storageInventoryOrg) {
|
|
|
|
+ this.isOrg = false
|
|
|
|
+ } else {
|
|
|
|
+ this.basicForm.deliveryDept = ''
|
|
|
|
+ this.basicForm.storageWarehouse = ''
|
|
|
|
+ this.basicForm.deliveryWarehouse = ''
|
|
|
|
+ this.isOrg = true
|
|
|
|
+ // 选择调入库存组织时判断调拨方式
|
|
|
|
+ this.basicForm.allotType = ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 控制子表内货位是否可以填写,根据选择仓库内csFlag
|
|
|
|
+ controlDCHW() {
|
|
|
|
+ console.log("🚀 ~ file: add.vue:735 调出货位")
|
|
|
|
+ this.isDCCk = true
|
|
|
|
+ this.materialInfo.forEach(item => {
|
|
|
|
+ item.deliveryAllocation = null
|
|
|
|
+ item.deliveryAllocationName = null
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ controlDRHW() {
|
|
|
|
+ console.log("🚀 ~ file: add.vue:735 调入货位")
|
|
|
|
+ this.isDRCk = true
|
|
|
|
+ this.materialInfo.forEach(item => {
|
|
|
|
+ item.storageAllocation = null
|
|
|
|
+ item.storageAllocationName = null
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 输入数量或者主数量同步改变
|
|
// 输入数量或者主数量同步改变
|
|
getZSL(scope) {
|
|
getZSL(scope) {
|
|
scope.row.qty = scope.row.mainQty
|
|
scope.row.qty = scope.row.mainQty
|
|
@@ -788,6 +829,8 @@ export default {
|
|
if(this.basicForm.storageWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.storageWarehouse, '调入仓库') }
|
|
if(this.basicForm.storageWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.storageWarehouse, '调入仓库') }
|
|
if(this.basicForm.deliveryWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.deliveryWarehouse, '调出仓库') }
|
|
if(this.basicForm.deliveryWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.deliveryWarehouse, '调出仓库') }
|
|
if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
|
|
if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
|
|
|
|
+ // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
|
|
|
|
+ this.controlCk()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -893,6 +936,12 @@ export default {
|
|
this.basicForm.deliveryInventoryOrg = selection[0].id
|
|
this.basicForm.deliveryInventoryOrg = selection[0].id
|
|
this.basicForm.deliveryInventoryOrgCode = selection[0].code
|
|
this.basicForm.deliveryInventoryOrgCode = selection[0].code
|
|
this.basicForm.deliveryInventoryOrgName = selection[0].name
|
|
this.basicForm.deliveryInventoryOrgName = selection[0].name
|
|
|
|
+ // 选择调入库存组织时判断调拨方式
|
|
|
|
+ if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
|
|
|
|
+ this.basicForm.allotType = '4'
|
|
|
|
+ } else {
|
|
|
|
+ this.basicForm.allotType = '2'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this.referCondition.title == '调入库存组织') {
|
|
if (this.referCondition.title == '调入库存组织') {
|
|
this.ruOrgOptions = selection
|
|
this.ruOrgOptions = selection
|
|
@@ -926,12 +975,24 @@ export default {
|
|
this.ruHouseOptions = selection
|
|
this.ruHouseOptions = selection
|
|
this.basicForm.storageWarehouse = selection[0].id
|
|
this.basicForm.storageWarehouse = selection[0].id
|
|
this.basicForm.storageWarehouseName = selection[0].name
|
|
this.basicForm.storageWarehouseName = selection[0].name
|
|
|
|
+ console.log('1111', selection[0].csFlag)
|
|
|
|
+ if(selection[0].csFlag == 'N') {
|
|
|
|
+ this.isDRCk = true
|
|
|
|
+ } else {
|
|
|
|
+ this.isDRCk = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this.referCondition.title == '调出仓库') {
|
|
if (this.referCondition.title == '调出仓库') {
|
|
this.chuHouseOptions = selection
|
|
this.chuHouseOptions = selection
|
|
this.basicForm.deliveryWarehouse = selection[0].id
|
|
this.basicForm.deliveryWarehouse = selection[0].id
|
|
this.basicForm.deliveryWarehouseCode = selection[0].code
|
|
this.basicForm.deliveryWarehouseCode = selection[0].code
|
|
this.basicForm.deliveryWarehouseName = selection[0].name
|
|
this.basicForm.deliveryWarehouseName = selection[0].name
|
|
|
|
+ console.log('2222', selection[0].csFlag)
|
|
|
|
+ if (selection[0].csFlag == 'N') {
|
|
|
|
+ this.isDCCk = true
|
|
|
|
+ } else {
|
|
|
|
+ this.isDCCk = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this.referCondition.title == '调出货位') {
|
|
if (this.referCondition.title == '调出货位') {
|
|
this.materialInfo[this.tableIndex].deliveryAllocationName = selection[0].name
|
|
this.materialInfo[this.tableIndex].deliveryAllocationName = selection[0].name
|
|
@@ -945,6 +1006,8 @@ export default {
|
|
this.materialInfo[this.tableIndex].storageDeptName = selection[0].name
|
|
this.materialInfo[this.tableIndex].storageDeptName = selection[0].name
|
|
this.materialInfo[this.tableIndex].storageDept = selection[0].id
|
|
this.materialInfo[this.tableIndex].storageDept = selection[0].id
|
|
}
|
|
}
|
|
|
|
+ // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
|
|
|
|
+ this.controlCk()
|
|
},
|
|
},
|
|
chooseTreeRefer(type, isPage, title) {
|
|
chooseTreeRefer(type, isPage, title) {
|
|
this.referCondition.type = type
|
|
this.referCondition.type = type
|