From bb3574fee82d095203adc09b6fa7039a3eb940a0 Mon Sep 17 00:00:00 2001
From: wangwei <1610949092@qq.com>
Date: Mon, 27 Feb 2023 16:29:01 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/purchase/purApply/purOrderSelectProduct.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/views/purchase/purApply/purOrderSelectProduct.vue b/src/views/purchase/purApply/purOrderSelectProduct.vue
index c16d70fa..97168f1f 100644
--- a/src/views/purchase/purApply/purOrderSelectProduct.vue
+++ b/src/views/purchase/purApply/purOrderSelectProduct.vue
@@ -5,7 +5,7 @@
                     <el-row>
                       <el-col :span="12">
                         <el-form-item label="UDI码:" class="query-form-item">
-                            <el-input v-model="listQuery.nameCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input>
+                            <el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input>
                         </el-form-item>
                       </el-col>
                      <el-col :span="6">

From 05bde6188d9d298b1678fefde3e32bc7cd356225 Mon Sep 17 00:00:00 2001
From: anthonywj <yewenjie20@vip.qq.com>
Date: Mon, 27 Feb 2023 17:02:55 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=8D=95?=
 =?UTF-8?q?=E6=8D=AE=E4=BF=AE=E6=95=B4=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=B8=8A?=
 =?UTF-8?q?=E4=BC=A0bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/api/inout/erpOrder.js                     |   6 +-
 src/api/inout/order.js                        |  14 ++
 src/api/system/systemPDFTemplate.js           |   4 +-
 src/views/inout/DialogSelectRl.vue            |  10 +-
 src/views/inout/DialogSelectThrOrder.vue      |  69 +++++----
 src/views/inout/DialogSelectUnit.vue          |   4 +-
 src/views/inout/IoCreateBusOrder.vue          |   2 +
 src/views/inout/PanelCreateOrderBizDetail.vue | 143 ++++++++++++++++--
 src/views/system/print/pdfTmpleateManage.vue  |  29 ++--
 src/views/thirdSys/order/thrOrder.vue         |  20 ++-
 10 files changed, 236 insertions(+), 65 deletions(-)

diff --git a/src/api/inout/erpOrder.js b/src/api/inout/erpOrder.js
index ed85bfc1..1a99f7af 100644
--- a/src/api/inout/erpOrder.js
+++ b/src/api/inout/erpOrder.js
@@ -119,9 +119,9 @@ export function addStockOrder(query) {
 
 export function addReceiveOrder(query) {
     return axios({
-        url: "/udiwms/receive/addStockOrder",
-        method: "get",
-        params: query
+        url: "/udiwms/inout/order/addReceiveOrder",
+        method: "post",
+      data: query
     });
 }
 
diff --git a/src/api/inout/order.js b/src/api/inout/order.js
index 9f4652b8..d7ad0784 100644
--- a/src/api/inout/order.js
+++ b/src/api/inout/order.js
@@ -281,6 +281,20 @@ export function updateCodeBindSup(query) {
   )
 }
 
+
+export function updateBizBind(query) {
+  return axios(
+    {
+      url: "/udiwms/inout/biz/updateBind",
+      method: "post",
+      data: query
+    }
+  )
+}
+
+
+
+
 export function backStock(query) {
   return axios(
     {
diff --git a/src/api/system/systemPDFTemplate.js b/src/api/system/systemPDFTemplate.js
index a1c52668..2a2325ae 100644
--- a/src/api/system/systemPDFTemplate.js
+++ b/src/api/system/systemPDFTemplate.js
@@ -54,8 +54,8 @@ export function systemPDFModuleSave(data, formName, method = "post") {
 export function systemPDFTemplateDeleteById(query) {
   return axios({
     url: "/system/pdf/template/delete",
-    method: "get",
-    params: query
+    method: "post",
+    data: query
   });
 }
 
diff --git a/src/views/inout/DialogSelectRl.vue b/src/views/inout/DialogSelectRl.vue
index c73eb67e..876835b5 100644
--- a/src/views/inout/DialogSelectRl.vue
+++ b/src/views/inout/DialogSelectRl.vue
@@ -64,7 +64,7 @@
       </el-table-column>
     </el-table>
     <el-dialog
-      title="产品信息编辑"
+      title="产品信息详情"
       :visible.sync="editDialogVisible"
       :close-on-click-modal="false"
       append-to-body
@@ -502,6 +502,10 @@ import {updateBind} from "../../api/inout/order"
 export default {
   name: "DialogSelectRl",
   props: {
+    type: {
+      type: Object,
+      required: true,
+    },
     curRow: {
       type: Object,
       required: true,
@@ -510,7 +514,7 @@ export default {
       type: Function,
       required: true,
     },
-    fromCorp:{
+    fromCorp: {
       type: Object,
       required: true,
     },
@@ -705,7 +709,7 @@ export default {
     ,
     bindId(val) {
 
-      if (this.curRow.code != null) {
+      if (this.curRow.code != null || this.type == 1) {
         this.$emit("selectBindRl", val);
         this.$emit("closeBindDialog", true);
       } else {
diff --git a/src/views/inout/DialogSelectThrOrder.vue b/src/views/inout/DialogSelectThrOrder.vue
index 1c6f9553..f8b8819d 100644
--- a/src/views/inout/DialogSelectThrOrder.vue
+++ b/src/views/inout/DialogSelectThrOrder.vue
@@ -149,6 +149,7 @@ import {getOriginBusType} from "@/api/basic/busOriginType";
 import {filterAllByUser} from "@/api/system/invWarehouse";
 import selectInvDialog from "./DialogSelectInv";
 import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
+import {getThrOrderDetails, getThrOrders} from "@/api/thrsys/thrOrder";
 
 export default {
   name: "closeDialog",
@@ -253,9 +254,21 @@ export default {
       this.unionQuery.page = val;
       this.getList();
     },
-    handleChange(val) {
-      this.currentRow = val;
-      this.detailList = val.subErpOrders;
+    handleChange(row) {
+      this.currentRow = row;
+      let query = {orderIdFk: row.billNo};
+      getThrOrderDetails(query)
+        .then((response) => {
+          if (response.code == 20000) {
+            this.detailList = response.data.list || [];
+          } else {
+            this.$message.error(response.message);
+          }
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
     },
     handleErpPageChange(val) {
       this.listQuery.page = val;
@@ -275,7 +288,7 @@ export default {
         this.listQuery.endDate = null;
       }
       this.listQuery.customerId = store.getters.customerId;
-      getCloudErp(this.listQuery)
+      getThrOrders(this.listQuery)
         .then((response) => {
           console.log(response)
           this.loading = false;
@@ -301,26 +314,21 @@ export default {
       if (this.$isBlank(this.currentRow.id)) {
         return;
       }
-      this.curLocInv = this.currentRow.locStorageCode;
-      if (this.$isBlank(this.curLocInv)) {
-        this.storageVisible = true;
-      } else {
-        let tQuery = {
-          id: this.currentRow.id,
-          locStorageCode: this.curLocInv,
-          invWarehouseCode: this.currentRow.invWarehouseCode,
-        }
-        addStockOrder(tQuery)
-          .then((response) => {
-            if (response.code === 20000) {
-              this.closeDialog();
-            } else {
-              this.$message.error(response.message);
-            }
-          })
-          .catch(() => {
-          });
+      let tQuery = {
+        id: this.currentRow.id,
+        locStorageCode: this.curLocInv,
+        invWarehouseCode: this.currentRow.invWarehouseCode,
       }
+      addStockOrder(tQuery)
+        .then((response) => {
+          if (response.code === 20000) {
+            this.closeDialog();
+          } else {
+            this.$message.error(response.message);
+          }
+        })
+        .catch(() => {
+        });
     },
     hideSearch() {
       this.showSearch = !this.showSearch;
@@ -401,8 +409,6 @@ export default {
         .then((response) => {
           this.thirdSys = response.data.list || [];
           this.listQuery.thirdSysFk = this.thirdSys[0].thirdId;
-          this.uploadData.thirdSys = this.listQuery.thirdSysFk;
-          this.selectSysParam();
           this.getBusType();
         })
         .catch(() => {
@@ -412,15 +418,20 @@ export default {
     },
 
 
-  },
+  }
+  ,
   created() {
 
     this.getBasicThirdSys();
     this.getStorage();
-  },
-  components: {selectInvDialog}
+  }
+  ,
+  components: {
+    selectInvDialog
+  }
 
-};
+}
+;
 </script>
 
 <style scoped>
diff --git a/src/views/inout/DialogSelectUnit.vue b/src/views/inout/DialogSelectUnit.vue
index df5d5d24..4f772d11 100644
--- a/src/views/inout/DialogSelectUnit.vue
+++ b/src/views/inout/DialogSelectUnit.vue
@@ -132,8 +132,10 @@ export default {
 
   },
   mounted() {
-    console.log("this.codeId = " + this.codeId)
     if (this.codeId != null) {
+      if (this.codeId.bindRlFk != null) {
+        this.codeId.relId = this.codeId.bindRlFk;
+      }
       this.getUnitListByCode(this.codeId)
     }
   }
diff --git a/src/views/inout/IoCreateBusOrder.vue b/src/views/inout/IoCreateBusOrder.vue
index fe3c3551..4b790655 100644
--- a/src/views/inout/IoCreateBusOrder.vue
+++ b/src/views/inout/IoCreateBusOrder.vue
@@ -401,6 +401,8 @@ export default {
     closeDialog() {
       this.addOrderVisible = false;
       this.addHosOrderVisible = false;
+      this.selectReceiveVisible = false;
+      this.selectThrOrderVisible = false;
       this.getList();
     },
 
diff --git a/src/views/inout/PanelCreateOrderBizDetail.vue b/src/views/inout/PanelCreateOrderBizDetail.vue
index cb4b679d..11dbc05c 100644
--- a/src/views/inout/PanelCreateOrderBizDetail.vue
+++ b/src/views/inout/PanelCreateOrderBizDetail.vue
@@ -97,7 +97,7 @@
                        prop="manufacturer"
                        show-overflow-tooltip
       ></el-table-column>
-      <el-table-column label="操作" width="150">
+      <el-table-column label="操作" width="250">
         <template slot-scope="scope">
 
           <el-button
@@ -127,6 +127,24 @@
           >复制
           </el-button
           >
+
+          <el-button
+            type="text"
+            size="small"
+            v-if="scope.row.bindRlFk==null"
+            @click.native.stop="bindRl(scope.row)"
+          >绑定产品
+          </el-button
+          >
+          <el-button
+            type="text"
+            size="small"
+            v-if="scope.row.supId==null"
+            @click.native.stop="handleUnitClick(scope.row)"
+          >绑定供应商
+          </el-button
+          >
+
           <el-button
             type="text"
             size="small"
@@ -153,8 +171,6 @@
         :data="thisData"
       ></stockOrderNewSelectProduct>
     </el-dialog>
-
-
     <el-dialog
       title="库存产品录入"
       :visible.sync="selectInvProductVisible"
@@ -173,6 +189,44 @@
     </el-dialog>
 
 
+    <!--    绑定产品-->
+    <el-dialog
+      title="绑定产品"
+      :visible.sync="selectRlVisible"
+      width="80%"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      v-if="selectRlVisible"
+      append-to-body
+    >
+      <selectRlDialog
+        :curRow="curRow"
+        :type="bizType"
+        v-on:selectBindRl="selectBindRl"
+        v-on:closeBindDialog="closeBindDialog"
+      ></selectRlDialog>
+    </el-dialog>
+
+
+    <!--    绑定供应商-->
+    <el-dialog
+      title="绑定供应商"
+      :visible.sync="dialogTableVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      v-if="dialogTableVisible"
+      width="80%"
+      append-to-body
+    >
+      <DialogSelectUnit
+        :codeId="curRow"
+        :type="bizType"
+        v-on:selectSupUnit="selectSupUnit"
+        v-on:closeBindDialog="closeBindDialog"
+      ></DialogSelectUnit>
+    </el-dialog>
+
+
   </div>
 </template>
 
@@ -180,6 +234,9 @@
 import stockOrderNewSelectProduct from "./DialogSelectProduct";
 import dialogInvProduct from "./DialogSelectInvProduct";
 import {addBizProduct, getDetailBizs, updateBizProduct, delBizProduct} from "@/api/inout/orderDetailCode";
+import {updateBizBind} from "@/api/inout/order";
+import selectRlDialog from "@/views/inout/DialogSelectRl";
+import DialogSelectUnit from "@/views/inout/DialogSelectUnit";
 
 export default {
   name: "IoCreateOrderBizDetail",
@@ -208,6 +265,7 @@ export default {
   },
   data() {
     return {
+      bizType: 1,
       loading: false,
       query: {
         orderId: null,
@@ -226,9 +284,13 @@ export default {
       invQueryData: {
         invCode: null,
       },
+      selectRlVisible: false,
+      dialogTableVisible: false,
+      curRow: null,
     };
   },
   components: {
+    selectRlDialog, DialogSelectUnit,
     stockOrderNewSelectProduct,
     dialogInvProduct,
   },
@@ -239,7 +301,6 @@ export default {
       getDetailBizs(this.query) //查找该单号下的所有条码
         .then((response) => {
           this.detailList = response.data.list || [];
-
           this.total = response.data.total || 0;
           this.loading = false;
         })
@@ -269,9 +330,15 @@ export default {
     },
 
     rowStyle({row, rowIndex}) {
+      let rowBackground = {};
+      if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.bindRlFk)) {
+        rowBackground.color = '#f60303';
+        return rowBackground;
+      }
+
       if (this.viewType == 1)
         return null;
-      let rowBackground = {};
+
       if (!row.checkSuccess) {
         rowBackground.color = '#f60303';
       }
@@ -367,19 +434,73 @@ export default {
           this.dataList = [];
           this.pageTotal = 0;
         });
+    },
+    bindRl(val) {
+      this.curRow = val;
+      this.selectRlVisible = true;
+    },
+
+    handleUnitClick(row) {
+      this.curRow = row;
+      this.dialogTableVisible = true;
+    },
+
+    selectBindRl(row) {
+      let query = {
+        id: this.curRow.id,
+        bindRlFk: row.id,
+      };
+      updateBizBind(query).then((response) => {
+          if (response.code == 20000) {
+            this.$message.success("绑定成功");
+            this.getOrderDetails();
+          } else
+            this.$message.error(response.message);
+        }
+      ).catch(() => {
+
+      });
+    },
+
+    selectSupUnit(row) {
+      let query = {
+        id: this.curRow.id,
+        supId: row.erpId,
+      };
+      updateBizBind(query).then((response) => {
+        if (response.code == 20000) {
+          this.$message.success("绑定成功");
+          this.getOrderDetails();
+        } else {
+          this.$message.error(response.message);
+        }
+      }).catch(() => {
+      });
     }
+    ,
+
+
+    closeBindDialog() {
+      this.selectRlVisible = false;
+      this.dialogTableVisible = false;
+      this.refreshPanel();
+    }
+    ,
   }
   ,
   filters: {}
   ,
 
   watch: {
-    'idQuery.billNo': {
-      handler() {
-        this.refreshOrder(this.idQuery);
-      },
-    }
-  },
+    'idQuery.billNo':
+      {
+        handler() {
+          this.refreshOrder(this.idQuery);
+        }
+        ,
+      }
+  }
+  ,
 
   mounted() {
     document.body.ondrop = function (event) {
diff --git a/src/views/system/print/pdfTmpleateManage.vue b/src/views/system/print/pdfTmpleateManage.vue
index 10bd76ae..b11b21e8 100644
--- a/src/views/system/print/pdfTmpleateManage.vue
+++ b/src/views/system/print/pdfTmpleateManage.vue
@@ -126,7 +126,7 @@
                 accept=".jasper"
                 :on-change="uploadOnchange"
                 :on-success="uploadHandleSuccess"
-                :auto-upload="true"
+                :auto-upload="false"
                 :file-list="fileList"
 
               >
@@ -156,7 +156,7 @@
                 :on-change="uploadJrxmlOnchange"
                 :on-success="uploadJrxmlHandleSuccess"
                 :file-list="jrxmlFileList"
-                :auto-upload="true">
+                :auto-upload="false">
                 <el-button slot="trigger" size="small" type="primary" :disabled="uploadDisabled">选取文件
                 </el-button>
                 <div slot="tip" class="el-upload__tip" v-if="formData.jrxmlPath==null">只能上传 jrxml
@@ -333,12 +333,12 @@ export default {
         module: [
           {required: true, message: "请选择模板类型", trigger: "blur"}
         ],
-        jasper: [
-          {required: true, message: "请上传jasper文件", trigger: "blur"}
-        ],
-        jrxml: [
-          {required: true, message: "请上传jrxml文件", trigger: "blur"}
-        ]
+        // jasper: [
+        //   {required: true, message: "请上传jasper文件", trigger: "blur"}
+        // ],
+        // jrxml: [
+        //   {required: true, message: "请上传jrxml文件", trigger: "blur"}
+        // ]
 
       },
       deleteLoading: false,
@@ -400,7 +400,7 @@ export default {
       this.getList();
     },
     jumpDl(row) {
-      this.handleDownload(BASE_URL + "/udiwms/donwload/file?fileName=" + row.jrxmlPath, row.name + ".jrxml");
+      this.handleDownload(this.BASE_URL + "/udiwms/donwload/file?fileName=" + row.jrxmlPath, row.name + ".jrxml");
     },
 
 
@@ -689,7 +689,12 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        systemPDFTemplateDeleteById({id: row.id, path: row.path})
+        let query =
+          {
+            id: row.id,
+            path: row.path
+          };
+        systemPDFTemplateDeleteById(query)
           .then(response => {
             console.log(response)
             if (response.code === 20000) {
@@ -782,8 +787,8 @@ export default {
     this.getList();
     this.getPDFModuleNameList();
     this.getModuleList();
-    this.uploadUrl = BASE_URL + "/udiwms/upload/pdf/template/jasper";
-    this.uploadJrxmlUrl = BASE_URL + "/udiwms/upload/pdf/template/jrxml";
+    this.uploadUrl = this.BASE_URL + "/udiwms/upload/pdf/template/jasper";
+    this.uploadJrxmlUrl = this.BASE_URL + "/udiwms/upload/pdf/template/jrxml";
     this.headers = {
       ADMIN_ID: store.getters.adminId,
       ADMIN_TOKEN: store.getters.token,
diff --git a/src/views/thirdSys/order/thrOrder.vue b/src/views/thirdSys/order/thrOrder.vue
index 427fe066..fda6c2db 100644
--- a/src/views/thirdSys/order/thrOrder.vue
+++ b/src/views/thirdSys/order/thrOrder.vue
@@ -112,12 +112,11 @@
   </div>
 </template>
 <script>
-import {delThrOrders, delAll, downloadAll} from "@/api/thrsys/thrOrder";
+import {delThrOrders, delAll, downloadAll, getThrOrders, getThrOrderDetails} from "@/api/thrsys/thrOrder";
 import {getBussinessType} from "@/api/basic/bussinessType";
 import {getOriginBusType} from "@/api/basic/busOriginType";
 import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
 import {selectIp} from "@/api/param/systemParamConfig";
-import {getCloudErp, getThirdSysOrder} from "@/api/inout/erpOrder";
 
 export default {
   data() {
@@ -215,7 +214,7 @@ export default {
         this.filterQuery.endDate = null;
       }
       this.loading = true;
-      getThirdSysOrder(this.filterQuery)
+      getThrOrders(this.filterQuery)
         .then((response) => {
           if (response.code == 20000) {
             this.list = response.data.list || [];
@@ -232,7 +231,20 @@ export default {
         });
     },
     handleDetail(row) {
-      this.detailList = row.subErpOrders;
+      let query = {orderIdFk: row.billNo};
+      getThrOrderDetails(query)
+        .then((response) => {
+          if (response.code == 20000) {
+            this.detailList = response.data.list || [];
+          } else {
+            this.$message.error(response.message);
+          }
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+
     },
     deleteDialog(row) {
       this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {

From b533624492add42d0bffcd45f98e05133587ceda Mon Sep 17 00:00:00 2001
From: wangwei <1610949092@qq.com>
Date: Mon, 27 Feb 2023 18:54:05 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/purchase/purPlan/purPlanSearch.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/views/purchase/purPlan/purPlanSearch.vue b/src/views/purchase/purPlan/purPlanSearch.vue
index 384a63d0..12c1f387 100644
--- a/src/views/purchase/purPlan/purPlanSearch.vue
+++ b/src/views/purchase/purPlan/purPlanSearch.vue
@@ -44,7 +44,7 @@
                 <el-table-column label="创建人" prop="createByName"></el-table-column>
                 <el-table-column label="审核人" prop="auditByName"></el-table-column>
                 <el-table-column label="采购仓库" prop="invName"></el-table-column>
-                <el-table-column label="采购分库" prop="subInvName"></el-table-column>
+                <!--<el-table-column label="采购分库" prop="subInvName"></el-table-column>-->
                 <el-table-column label="采购说明" prop="remark"></el-table-column>
                 <el-table-column label="状态" prop="status">
                     <template slot-scope="scope">