|
@@ -270,7 +270,7 @@
|
|
|
<el-button @click="kCancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 添加或修改销售出库单:- 过磅记录生成数据对话框 -->
|
|
|
+ <!-- 添加或出库单:- 过磅记录生成数据对话框 -->
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
|
width="1300px"
|
|
@@ -1856,8 +1856,8 @@ export default {
|
|
|
btnName: "编辑",
|
|
|
btnType: "myEdit",
|
|
|
btnIcon: "",
|
|
|
- btnShowCondition:
|
|
|
- '[{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"3"},{"fieldName":"sale_order.status","mark":"3","refValue":"4"},{"fieldName":"sale_order.status","mark":"3","refValue":"5"},{"fieldName":"sale_order.status","mark":"3","refValue":"6"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"9"},{"fieldName":"sale_order.status","mark":"3","refValue":"100"},{"fieldName":"sale_order.status","mark":"3","refValue":"101"},{"fieldName":"sale_order.status","mark":"3","refValue":"11"}]',
|
|
|
+ btnShowCondition:""
|
|
|
+ ,
|
|
|
btnHasPermi: "huaxian:xsglddgl:INSERT",
|
|
|
children: [],
|
|
|
},
|
|
@@ -1927,6 +1927,14 @@ export default {
|
|
|
'[{"fieldName":"sale_order.status","mark":"6","refValue":"9"},{"fieldName":"sale_order.status","mark":"3","refValue":"11"}]',
|
|
|
children: [],
|
|
|
btnHasPermi: "huaxian:xsglddgl:INSERT",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ btnName: "异常结束",
|
|
|
+ btnType: "myEror",
|
|
|
+ btnIcon: "",
|
|
|
+ btnShowCondition:"",
|
|
|
+ children: [],
|
|
|
+ btnHasPermi: "huaxian:xsglddgl:INSERT",
|
|
|
}
|
|
|
// {
|
|
|
// btnName: "记录批次",
|
|
@@ -2138,8 +2146,12 @@ export default {
|
|
|
let saleProductsNo = this.productionTableData
|
|
|
.map((item) => item.saleProductNo)
|
|
|
.join(","); //销售单表sale_products_no字段存货品表的sale_product_no,逗号分割
|
|
|
+ var st = null;
|
|
|
+ if(!this.isEdit){
|
|
|
+ st = 1;
|
|
|
+ };
|
|
|
let saleValue = {
|
|
|
- status: 1, //新增销售单时 默认为1
|
|
|
+ status: st, //新增销售单时 默认为1
|
|
|
saleNo,
|
|
|
lotNumber, //批号
|
|
|
saleProductsNo,
|
|
@@ -3750,6 +3762,9 @@ export default {
|
|
|
case "myComplate":
|
|
|
this.myComplateHandler(row, btnData);
|
|
|
break;
|
|
|
+ case "myEror":
|
|
|
+ this.myErorHandler(row, btnData);
|
|
|
+ break;
|
|
|
case "printOutBound":
|
|
|
this.myPrintOutBoundHandler(row, btnData);
|
|
|
break;
|
|
@@ -3795,6 +3810,22 @@ export default {
|
|
|
} else this.$message({type: "error", message: "订单已完成失败,请稍后再试",});
|
|
|
}).catch(() => this.$message({type: "info", message: "已取消完成",}));
|
|
|
},
|
|
|
+ //异常结束
|
|
|
+ myErorHandler(row) {
|
|
|
+ this.$confirm("即将确认异常结束, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ // 调用完成按钮
|
|
|
+ let payload = {id: row.id, status: 12, saleNo: row.saleNo, completionTime: new Date(),};
|
|
|
+ let res = await updateOrder(payload);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({type: "success", message: "订单已异常结束",});
|
|
|
+ this.getList();
|
|
|
+ } else this.$message({type: "error", message: "订单异常结束失败,请稍后再试",});
|
|
|
+ }).catch(() => this.$message({type: "info", message: "已取消异常结束",}));
|
|
|
+ },
|
|
|
noNeedHandler(btnData, row) {
|
|
|
this.$modal
|
|
|
.confirm("是否确认执行该操作?")
|