|
@@ -56,6 +56,7 @@ export default {
|
|
count: 0,
|
|
count: 0,
|
|
loading: false,
|
|
loading: false,
|
|
visible: false,
|
|
visible: false,
|
|
|
|
+ control: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -98,7 +99,76 @@ export default {
|
|
set() {},
|
|
set() {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- watch: {},
|
|
|
|
|
|
+ watch: {
|
|
|
|
+ // 调出库存组织
|
|
|
|
+ "params.deliveryInventoryOrgName": {
|
|
|
|
+ handler: function (nVal, oVal) {
|
|
|
|
+ this.control &&
|
|
|
|
+ (this.params = {
|
|
|
|
+ ...this.params,
|
|
|
|
+ deliveryWarehouse: null,
|
|
|
|
+ deliveryWarehouseCode: null,
|
|
|
|
+ deliveryWarehouseName: null,
|
|
|
|
+ deliveryDept: null,
|
|
|
|
+ deliveryDeptCode: null,
|
|
|
|
+ deliveryDeptName: null,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // 调入库存组织
|
|
|
|
+ "params.storageInventoryOrgName": {
|
|
|
|
+ handler: function (nVal, oVal) {
|
|
|
|
+ this.control &&
|
|
|
|
+ (this.params = {
|
|
|
|
+ ...this.params,
|
|
|
|
+ storageWarehouse: null,
|
|
|
|
+ storageWarehouseName: null,
|
|
|
|
+ stAllotMaterialList: this.params["stAllotMaterialList"].map(
|
|
|
|
+ (item) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ storageDept: null,
|
|
|
|
+ storageDeptCode: null,
|
|
|
|
+ storageDeptName: null,
|
|
|
|
+ })
|
|
|
|
+ ),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // 调出仓库
|
|
|
|
+ "params.deliveryWarehouseName": {
|
|
|
|
+ handler: function (nVal, oVal) {
|
|
|
|
+ this.control &&
|
|
|
|
+ (this.params = {
|
|
|
|
+ ...this.params,
|
|
|
|
+ stAllotMaterialList: this.params["stAllotMaterialList"].map(
|
|
|
|
+ (item) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ deliveryAllocation: null,
|
|
|
|
+ deliveryAllocationCode: null,
|
|
|
|
+ deliveryAllocationName: null,
|
|
|
|
+ })
|
|
|
|
+ ),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // 调入仓库
|
|
|
|
+ "params.storageWarehouseName": {
|
|
|
|
+ handler: function (nVal, oVal) {
|
|
|
|
+ this.control &&
|
|
|
|
+ (this.params = {
|
|
|
|
+ ...this.params,
|
|
|
|
+ stAllotMaterialList: this.params["stAllotMaterialList"].map(
|
|
|
|
+ (item) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ storageAllocation: null,
|
|
|
|
+ storageAllocationCode: null,
|
|
|
|
+ storageAllocationName: null,
|
|
|
|
+ })
|
|
|
|
+ ),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
setVisible(prop) {
|
|
setVisible(prop) {
|
|
this.visible = prop;
|
|
this.visible = prop;
|
|
@@ -119,6 +189,7 @@ export default {
|
|
dwCsFlag: null,
|
|
dwCsFlag: null,
|
|
swCsFlag: null,
|
|
swCsFlag: null,
|
|
};
|
|
};
|
|
|
|
+ this.control = false;
|
|
this.tabName = tabName;
|
|
this.tabName = tabName;
|
|
this.TabColumn = TabColumns;
|
|
this.TabColumn = TabColumns;
|
|
this.$refs["superForm"].clearValidate();
|
|
this.$refs["superForm"].clearValidate();
|
|
@@ -139,6 +210,8 @@ export default {
|
|
billDate: new Date().Format("yyyy-MM-dd"),
|
|
billDate: new Date().Format("yyyy-MM-dd"),
|
|
createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
|
|
createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
|
|
};
|
|
};
|
|
|
|
+ this.control = true;
|
|
|
|
+ this.useRowAdd(this.tabName);
|
|
} else {
|
|
} else {
|
|
await this.fetchItem(data);
|
|
await this.fetchItem(data);
|
|
this.$nextTick(async () => {
|
|
this.$nextTick(async () => {
|
|
@@ -180,6 +253,7 @@ export default {
|
|
),
|
|
),
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ this.control = true;
|
|
// 调入/出货位禁用——根据调入/出仓库
|
|
// 调入/出货位禁用——根据调入/出仓库
|
|
const { deliveryWarehouse, storageWarehouse } = this.params;
|
|
const { deliveryWarehouse, storageWarehouse } = this.params;
|
|
this.params.dwCsFlag = await this.fetchWarehouse(deliveryWarehouse);
|
|
this.params.dwCsFlag = await this.fetchWarehouse(deliveryWarehouse);
|
|
@@ -237,7 +311,10 @@ export default {
|
|
},
|
|
},
|
|
// 删行
|
|
// 删行
|
|
useRowRemove(prop, { row }) {
|
|
useRowRemove(prop, { row }) {
|
|
- console.log(row, "row");
|
|
|
|
|
|
+ if (this.tabInfo[prop].length < 2) {
|
|
|
|
+ this.$notify.warning("明细至少保留一行数据");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.params[prop].forEach((item, index) => {
|
|
this.params[prop].forEach((item, index) => {
|
|
if (item["rowno"] && item["rowno"] == row["rowno"]) {
|
|
if (item["rowno"] && item["rowno"] == row["rowno"]) {
|
|
item.id
|
|
item.id
|
|
@@ -245,6 +322,7 @@ export default {
|
|
: this.params[prop].splice(index, 1);
|
|
: this.params[prop].splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ this.changeQty();
|
|
},
|
|
},
|
|
// 保存
|
|
// 保存
|
|
useSave(prop) {
|
|
useSave(prop) {
|
|
@@ -324,6 +402,18 @@ export default {
|
|
this.$modal.closeLoading();
|
|
this.$modal.closeLoading();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 子表数量改变
|
|
|
|
+ changeQty(tabName) {
|
|
|
|
+ this.params.qty = this.params["stAllotMaterialList"].reduce(
|
|
|
|
+ (sum, item) => {
|
|
|
|
+ if (item.delFlag !== "2") {
|
|
|
|
+ sum += item.qty;
|
|
|
|
+ }
|
|
|
|
+ return sum;
|
|
|
|
+ },
|
|
|
|
+ 0
|
|
|
|
+ );
|
|
|
|
+ },
|
|
},
|
|
},
|
|
created() {},
|
|
created() {},
|
|
};
|
|
};
|
|
@@ -369,7 +459,7 @@ export default {
|
|
type="primary"
|
|
type="primary"
|
|
:size="size"
|
|
:size="size"
|
|
@click="sendToNC"
|
|
@click="sendToNC"
|
|
- v-show="params.status == '2'"
|
|
|
|
|
|
+ v-show="params.status == '2' && !params.ncCode"
|
|
>重传NC</el-button
|
|
>重传NC</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
@@ -471,6 +561,7 @@ export default {
|
|
:size="$attrs.size"
|
|
:size="$attrs.size"
|
|
:source.sync="scope.row"
|
|
:source.sync="scope.row"
|
|
:disabled="addType === 'see'"
|
|
:disabled="addType === 'see'"
|
|
|
|
+ @change="changeQty(tabName)"
|
|
>
|
|
>
|
|
</component>
|
|
</component>
|
|
</template>
|
|
</template>
|
|
@@ -490,6 +581,17 @@ export default {
|
|
>
|
|
>
|
|
</component>
|
|
</component>
|
|
</template>
|
|
</template>
|
|
|
|
+ <!-- 产品批号 -->
|
|
|
|
+ <template slot="producBatch" slot-scope="scope">
|
|
|
|
+ <component
|
|
|
|
+ v-bind="scope.attr"
|
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
|
+ :size="$attrs.size"
|
|
|
|
+ :source.sync="scope.row"
|
|
|
|
+ :disabled="addType === 'see' || !scope.row['materialCode']"
|
|
|
|
+ >
|
|
|
|
+ </component>
|
|
|
|
+ </template>
|
|
<!-- 调出货位 -->
|
|
<!-- 调出货位 -->
|
|
<template slot="deliveryAllocationName" slot-scope="scope">
|
|
<template slot="deliveryAllocationName" slot-scope="scope">
|
|
<component
|
|
<component
|
|
@@ -502,6 +604,11 @@ export default {
|
|
!params.dwCsFlag ||
|
|
!params.dwCsFlag ||
|
|
params.dwCsFlag === 'N'
|
|
params.dwCsFlag === 'N'
|
|
"
|
|
"
|
|
|
|
+ :queryParams="
|
|
|
|
+ () => ({
|
|
|
|
+ stordocId: params.deliveryWarehouse,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
>
|
|
>
|
|
</component>
|
|
</component>
|
|
</template>
|
|
</template>
|
|
@@ -517,6 +624,11 @@ export default {
|
|
!params.swCsFlag ||
|
|
!params.swCsFlag ||
|
|
params.swCsFlag === 'N'
|
|
params.swCsFlag === 'N'
|
|
"
|
|
"
|
|
|
|
+ :queryParams="
|
|
|
|
+ () => ({
|
|
|
|
+ stordocId: params.storageWarehouse,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
>
|
|
>
|
|
</component>
|
|
</component>
|
|
</template>
|
|
</template>
|