simple 4 年之前
父節點
當前提交
8a35d01ffe

+ 1 - 1
src/page/purchase/components/balance/balanceAdd.vue

@@ -9,7 +9,7 @@
           <Button @click="addJs" v-if="form.spzt == '1' || form.spzt == '4'">保存</Button>
           <Button @click="submitJs" :disabled="submitLoading"
             v-if="balanceType == 'edit' && (form.spzt == '1' || form.spzt == '4')">提交</Button>
-          <Button @click="cancel">返回</Button>
+          <Button :disabled="submitLoading" @click="cancel">返回</Button>
         </div>
         <Row class="mainCont">
           <Col span="4" class-name="tables">结算申请编号</Col>

+ 45 - 26
src/page/purchase/components/balance/balanceMxAdd.vue

@@ -1,25 +1,31 @@
 <template>
   <div>
-    <Card style="width:100%" :bordered="false" :dis-hover="true">
+    <Card style="width: 100%" :bordered="false" :dis-hover="true">
       <p slot="title">新增结算明细</p>
       <div slot="extra">
         <Button @click="returnq">返回</Button>
       </div>
       <Row :gutter="10" style="margin-bottom: 10px">
         <Col span="4">
-          <Select v-model="addForm.ssxm" disabled placeholder="项目名称" style="width: 95%">
+          <Select
+            v-model="addForm.ssxm"
+            disabled
+            placeholder="项目名称"
+            style="width: 95%"
+          >
             <Option
               v-for="item in ssxmList"
               :value="item.projectId"
               :key="item.projectId"
-            >{{ item.projectName }}</Option>
+              >{{ item.projectName }}</Option
+            >
           </Select>
         </Col>
         <Col span="4">
           <DatePicker
             format="yyyy-MM-dd"
             :value="addForm.xdsj"
-            @on-change="addForm.xdsj=$event"
+            @on-change="addForm.xdsj = $event"
             type="daterange"
             placeholder="下单时间"
           ></DatePicker>
@@ -28,17 +34,25 @@
           <DatePicker
             format="yyyy-MM-dd"
             :value="addForm.rksj"
-            @on-change="addForm.rksj=$event"
+            @on-change="addForm.rksj = $event"
             type="daterange"
             placeholder="入库时间"
           ></DatePicker>
         </Col>
         <Col span="4">
-          <Input v-model="addForm.rkd" placeholder="入库单" style="width: 95%" />
+          <Input
+            v-model="addForm.rkd"
+            placeholder="入库单"
+            style="width: 95%"
+          />
         </Col>
         <Col span="8">
-          <Button type="primary" style="width: 80px" @click="getTableData">查询</Button>
-          <Button type="primary" style="width: 80px" @click="addMx">添加</Button>
+          <Button type="primary" style="width: 80px" @click="getTableData"
+            >查询</Button
+          >
+          <Button type="primary" style="width: 80px" @click="addMx"
+            >添加</Button
+          >
         </Col>
       </Row>
       <Table
@@ -69,7 +83,7 @@
 <script>
 import {
   hajwySettlementList,
-  checkSettlementInvoiceTitle
+  checkSettlementInvoiceTitle,
 } from "@/service/getData";
 export default {
   name: "balanceMxAdd",
@@ -84,23 +98,23 @@ export default {
         ssxm: "", //项目名称
         xdsj: ["", ""], //下单时间
         rksj: ["", ""], //入库时间
-        rkd: "" //入库单
+        rkd: "", //入库单
       },
       //表格查询内容
       searchForm: {
         yjfl: "", //一级分类
         ejfl: "", // 二级分类
-        wlmc: "" //物料编码或名称
+        wlmc: "", //物料编码或名称
       },
       yjflList: [
         { label: "1", value: "1" },
         { label: "2", value: "2" },
-        { label: "3", value: "3" }
+        { label: "3", value: "3" },
       ],
       ejflList: [
         { label: "1", value: "1" },
         { label: "2", value: "2" },
-        { label: "3", value: "3" }
+        { label: "3", value: "3" },
       ],
       jldwList: [],
       wllxList: [],
@@ -175,10 +189,10 @@ export default {
           tooltip: true,
           width: 120,
           resizable: true,
-        }
+        },
       ],
       tableData: [],
-      tableSelect: []
+      tableSelect: [],
     };
   },
   methods: {
@@ -192,7 +206,7 @@ export default {
         storehouseTimeStart: this.addForm.rksj[0],
         storehouseTimeEnd: this.addForm.rksj[1],
         warehouseEntry: this.addForm.rkd,
-        supplierId: this.gysId
+        supplierId: this.gysId,
         // supplierId: 1000595
       };
       let postStr = "";
@@ -204,7 +218,7 @@ export default {
       }
       postStr = postStr.replace(/\&$/, "");
       this.tableLoading = true;
-      hajwySettlementList(postStr).then(res => {
+      hajwySettlementList(postStr).then((res) => {
         this.tableLoading = false;
         if (res.status == 200) {
           this.tableData = res.data;
@@ -212,29 +226,33 @@ export default {
       });
     },
     tableOnSelect(selection, row) {
-      this.tableSelect = selection;
+      console.log(selection);
+      this.$set(this, "tableSelect", selection);
     },
     tableOnCancel(selection, row) {
-      this.tableSelect = selection;
+      console.log(selection);
+      this.$set(this, "tableSelect", selection);
     },
     returnq() {
       this.addForm = {
         ssxm: "", //项目名称
         xdsj: ["", ""], //下单时间
         rksj: ["", ""], //入库时间
-        rkd: "" //入库单
+        rkd: "", //入库单
       };
-      this.orderIds = [];
+      this.$set(this, "orderIds", []);
       this.$emit("return");
     },
     //添加明细
     addMx() {
+      console.log(this.tableSelect);
+      console.log(this.orderIds);
       for (let item in this.tableSelect) {
         this.orderIds.push(this.tableSelect[item].orderId);
       }
       let arr = new Set(this.orderIds);
       let tArr = [...arr];
-      checkSettlementInvoiceTitle(tArr).then(res => {
+      checkSettlementInvoiceTitle(tArr).then((res) => {
         if (res.status == 200) {
           if (res.data == 1) {
             this.$Message.error("请选择同一公司下的物料");
@@ -243,16 +261,17 @@ export default {
               ssxm: "", //项目名称
               xdsj: ["", ""], //下单时间
               rksj: ["", ""], //入库时间
-              rkd: "" //入库单
+              rkd: "", //入库单
             };
-            this.orderIds = [];
+            this.$set(this, "orderIds", []);
             this.$emit("addMx", this.tableSelect);
             this.$emit("return");
+            this.$set(this, "tableSelect", []);
           }
         }
       });
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 1 - 1
src/page/purchase/components/order/orderAdd.vue

@@ -21,7 +21,7 @@
             @click="printRow()"
             >打印</Button
           >
-          <Button @click="cancel">返回</Button>
+          <Button @click="cancel" :disabled="submitloading">返回</Button>
         </div>
         <Row class="mainCont">
           <Col span="4" class-name="tables">订购编号</Col>

+ 4 - 1
src/page/purchase/components/order/orderMxAdd.vue

@@ -300,7 +300,7 @@ export default {
     //批量添加物料
     plAdd() {
       this.getSelectNode()
-      this.tableSelect = []
+      
       for (let key in this.tableSelectAll){
         this.tableSelect = this.tableSelect.concat(this.tableSelectAll[key])
       }
@@ -361,6 +361,9 @@ export default {
           }
           this.$emit("plAdd", arr);
           this.$emit("return");
+          // this.tableSelect = []
+          this.$set(this, 'tableSelect', [])
+          this.$set(this, 'tableSelectAll', {})
         } else {
           this.$Message.error(res.message);
         }

+ 1 - 1
src/page/purchase/components/plan/planAdd.vue

@@ -12,7 +12,7 @@
             ">保存</Button>
           <Button @click="submitSgjh" :disabled="submitLoading"
             v-if="planType == 'edit' && (form.spzt == '0' || form.spzt == '3')">提交</Button>
-          <Button @click="cancel">返回</Button>
+          <Button @click="cancel" :disabled="submitLoading">返回</Button>
         </div>
         <Row class="mainCont">
           <Col span="4" class-name="tables">计划单据号</Col>

+ 3 - 5
src/page/purchase/components/plan/planMxAdd.vue

@@ -158,7 +158,6 @@
           <span class="mustSpan">*</span>
         </Col>
         <Col span="6" class-name="tables">
-          <<<<<<< HEAD
           <Select
             clearable
             v-model="addForm.wllx"
@@ -172,14 +171,12 @@
               >{{ item.label }}</Option
             >
           </Select>
-          =======
           <InputNumber
             v-model="addForm.scjg"
             :active-change="false"
             style="width: 95%"
             placeholder="请输入"
           />
-          >>>>>>> 993f14895312276e3ad5f478f3efdabcf1a19f1d
         </Col>
         <Col span="6" class-name="tables">
           市场价格(元)
@@ -423,10 +420,10 @@ export default {
       });
     },
     tableOnSelect(selection, row) {
-      this.tableSelect = selection;
+      this.$set(this, "tableSelect", selection);
     },
     tableOnCancel(selection, row) {
-      this.tableSelect = selection;
+      this.$set(this, "tableSelect", selection);
     },
     plAdd() {
       let arr = [];
@@ -461,6 +458,7 @@ export default {
       }
       this.$emit("plAdd", arr);
       this.$emit("return");
+      this.$set(this, "tableSelect", []);
     },
     pageChange(val) {
       this.pageNum = val;