Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 2 years ago
parent
commit
af69e46fbf
35 changed files with 173 additions and 111 deletions
  1. 9 0
      src/api/business/purchase/task.js
  2. 1 1
      src/components/popover-select/components/index.vue
  3. 4 5
      src/components/popover-select/index.vue
  4. 1 1
      src/components/popover-tree-select/components/index.vue
  5. 4 8
      src/components/popover-tree-select/index.vue
  6. 6 3
      src/utils/request.js
  7. 1 2
      src/views/purchase/MaterialClassDivision/index.vue
  8. 2 2
      src/views/purchase/apply/add/index.vue
  9. 3 3
      src/views/purchase/apply/edit/index.vue
  10. 2 2
      src/views/purchase/apply/index.vue
  11. 2 2
      src/views/purchase/apply/see/index.vue
  12. 2 2
      src/views/purchase/catalogue/add/index.vue
  13. 3 3
      src/views/purchase/catalogue/edit/index.vue
  14. 2 2
      src/views/purchase/catalogue/index.vue
  15. 2 2
      src/views/purchase/catalogue/see/index.vue
  16. 2 2
      src/views/purchase/contract/add/index.vue
  17. 3 3
      src/views/purchase/contract/edit/index.vue
  18. 2 2
      src/views/purchase/contract/index.vue
  19. 2 2
      src/views/purchase/contract/see/index.vue
  20. 1 0
      src/views/purchase/deliveryAddress/add.vue
  21. 1 1
      src/views/purchase/purchase-content/index.vue
  22. 1 1
      src/views/purchase/purchase-content/see-purchase-task.vue
  23. 1 1
      src/views/purchase/purchase-order/add/index.vue
  24. 2 2
      src/views/purchase/purchase-order/edit/index.vue
  25. 3 3
      src/views/purchase/purchase-order/index.vue
  26. 1 1
      src/views/purchase/purchase-order/see/index.vue
  27. 1 1
      src/views/purchase/task/column.js
  28. 1 1
      src/views/purchase/task/documents-return/index.vue
  29. 2 2
      src/views/purchase/task/first-direct/index.vue
  30. 17 9
      src/views/purchase/task/index.vue
  31. 1 1
      src/views/purchase/task/modify-buyer/index.vue
  32. 1 1
      src/views/purchase/task/see/index.vue
  33. 68 31
      src/views/purchase/transferOrder/add.vue
  34. 17 7
      src/views/purchase/transferOrder/index.vue
  35. 2 2
      vue.config.js

+ 9 - 0
src/api/business/purchase/task.js

@@ -55,3 +55,12 @@ export function MODEIFYBUYER(data) {
     data: data,
   });
 }
+
+export function EXPORT(data, params) {
+  return request({
+    url: "/pu/order/generate/export",
+    method: "POST",
+    data: data,
+    params: params,
+  });
+}

+ 1 - 1
src/components/popover-select/components/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 4 - 5
src/components/popover-select/index.vue

@@ -82,9 +82,6 @@ export default {
       handler: function (newProp, oldProp) {
         if (!newProp) {
           this.data = [];
-          this.showValue = "";
-        } else {
-          this.showValue = newProp;
         }
       },
       immediate: true,
@@ -161,7 +158,6 @@ export default {
       </template>
     </el-input>
     <div
-      v-if="multiple && data.length"
       style="
         position: absolute;
         left: 10px;
@@ -171,7 +167,10 @@ export default {
         overflow: hidden;
       "
     >
-      <div style="width: 150px; display: flex">
+      <el-tag v-if="!multiple && data.length" :size="size">
+        {{ data[0].name }}
+      </el-tag>
+      <div v-if="multiple && data.length">
         <el-popover
           :offset="-10"
           :width="width"

+ 1 - 1
src/components/popover-tree-select/components/index.vue

@@ -60,7 +60,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 4 - 8
src/components/popover-tree-select/index.vue

@@ -69,8 +69,6 @@ export default {
     return {
       // popover宽度
       width: "",
-      // 显示value
-      showValue: "",
       // 选中data
       data: [],
     };
@@ -81,9 +79,6 @@ export default {
       handler: function (newProp, oldProp) {
         if (!newProp) {
           this.data = [];
-          this.showValue = "";
-        } else {
-          this.showValue = newProp;
         }
       },
       immediate: true,
@@ -145,7 +140,6 @@ export default {
 <template>
   <div ref="PopoverSelect" style="position: relative">
     <el-input
-      v-model="showValue"
       :size="size"
       :disabled="disabled"
       :clearable="clearable"
@@ -159,7 +153,6 @@ export default {
       </template>
     </el-input>
     <div
-      v-if="multiple && data.length"
       style="
         position: absolute;
         left: 10px;
@@ -169,7 +162,10 @@ export default {
         overflow: hidden;
       "
     >
-      <div style="width: 150px; display: flex">
+      <el-tag v-if="!multiple && data.length" :size="size">
+        {{ data[0].name }}
+      </el-tag>
+      <div v-if="multiple && data.length">
         <el-popover
           :offset="-10"
           :width="width"

+ 6 - 3
src/utils/request.js

@@ -86,6 +86,7 @@ service.interceptors.request.use(
 // 响应拦截器
 service.interceptors.response.use(
   (res) => {
+    console.log("res", res);
     // 未设置状态码则默认成功状态
     const code = res.data.code || 200;
     // 获取错误信息
@@ -121,10 +122,12 @@ service.interceptors.response.use(
       }
       return Promise.reject("无效的会话,或者会话已过期,请重新登录。");
     } else if (code === 500) {
-      Message({ message: msg, type: "error" });
+      Notification.error({ title: "error", message: msg });
+      // Message({ message: msg, type: "error" });
       return Promise.reject(new Error(msg));
     } else if (code === 601) {
-      Message({ message: msg, type: "warning" });
+      Notification.warning({ title: "error", message: msg });
+      // Message({ message: msg, type: "warning" });
       return Promise.reject("error");
     } else if (code !== 200) {
       Notification.error({ title: msg });
@@ -153,7 +156,7 @@ export function download(url, params, filename, config) {
   downloadLoadingInstance = Loading.service({
     text: "正在下载数据,请稍候",
     spinner: "el-icon-loading",
-    background: "rgba(0, 0, 0, 0.7)",
+    background: "rgba(255, 255, 255, 0.7)",
   });
   return service
     .post(url, params, {

+ 1 - 2
src/views/purchase/MaterialClassDivision/index.vue

@@ -199,12 +199,11 @@
               导出<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
               <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
 
-          <el-button type="primary" size="small">同步分配</el-button>
           <el-button type="primary" size="small">删除</el-button>
         </div>
         <el-table 

+ 2 - 2
src/views/purchase/apply/add/index.vue

@@ -64,7 +64,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -109,7 +109,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/apply/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/apply/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -73,7 +73,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/apply/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/catalogue/add/index.vue

@@ -64,7 +64,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -109,7 +109,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/catalogue/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/catalogue/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -73,7 +73,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/catalogue/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/contract/add/index.vue

@@ -63,7 +63,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -108,7 +108,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/contract/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/contract/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -77,7 +77,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/contract/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 0
src/views/purchase/deliveryAddress/add.vue

@@ -262,6 +262,7 @@ export default {
       if (this.referCondition.type == 'WAREHOUSE_PARAM') {
         this.houseOptions = selection
         this.basicForm.warehouseName = selection[0].name
+        this.basicForm.name = selection[0].name
         this.basicForm.warehouse = selection[0].id
       }
       if (this.referCondition.type == 'CONTACTS_PARAM') {

+ 1 - 1
src/views/purchase/purchase-content/index.vue

@@ -196,7 +196,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-content/see-purchase-task.vue

@@ -99,7 +99,7 @@ export default {
       try {
         // do something
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -141,7 +141,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/purchase-order/edit/index.vue

@@ -91,7 +91,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -153,7 +153,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 3 - 3
src/views/purchase/purchase-order/index.vue

@@ -167,7 +167,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -238,7 +238,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.loading = false;
       }
@@ -257,7 +257,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-order/see/index.vue

@@ -56,7 +56,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/task/column.js

@@ -124,7 +124,7 @@ export const SearchColumns = [
     key: "classIds",
     title: "物料分类",
     inputType: "PopoverTreeSelect",
-    multiple: false,
+    multiple: true,
     valueKey: "id",
     referName: "MATERIALCLASSIFY_PARAM",
     readonly: true,

+ 1 - 1
src/views/purchase/task/documents-return/index.vue

@@ -36,7 +36,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/task/first-direct/index.vue

@@ -33,7 +33,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -61,7 +61,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 17 - 9
src/views/purchase/task/index.vue

@@ -1,6 +1,6 @@
 <script>
 import { TableColumns, SearchColumns } from "./column";
-import { LIST, SHUTDOWN } from "@/api/business/purchase/task";
+import { LIST, SHUTDOWN, EXPORT } from "@/api/business/purchase/task";
 import {
   initPage,
   initLayout,
@@ -42,12 +42,12 @@ export default {
   },
   methods: {
     //
-    async fetchList(params, page) {
+    async fetchList(prop, page) {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
         const { code, msg, rows, total } = await LIST(
-          { ...params },
+          { ...prop },
           { pageNum, pageSize, isAsc: "desc", orderByColumn: "createTime" }
         );
         if (code === 200) {
@@ -58,7 +58,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -103,7 +103,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -121,6 +121,15 @@ export default {
       await setVisible(true);
       await beforeOpenDoSome(id);
     },
+    // 导出
+    async handleExport(prop, page) {
+      const { pageNum, pageSize } = page;
+      this.download(
+        "pu/order/generate/export",
+        { ...prop, pageNum, pageSize },
+        `KONG_${new Date().getTime()}.xlsx`
+      );
+    },
     // 打开查看drawer
     async handleOpenSeeDrawer(prop) {
       const { id } = prop;
@@ -134,9 +143,6 @@ export default {
       await setVisible(true);
       await beforeOpenDoSome(prop);
     },
-    handleCCCC(prop, source) {
-      console.log("CCCCCC", prop, source);
-    },
   },
 };
 </script>
@@ -231,7 +237,6 @@ export default {
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
               :query-params="column.queryParams(params)"
-              @change="handleCCCC"
             >
             </dr-popover-select>
           </el-form-item>
@@ -264,6 +269,9 @@ export default {
     </el-form>
     <el-row :gutter="24" style="padding: 0 20px">
       <el-col :span="24">
+        <el-button :size="size" @click="handleExport(params, page)">
+          导 出
+        </el-button>
         <el-button
           :size="size"
           :disabled="selectData.length !== 1"

+ 1 - 1
src/views/purchase/task/modify-buyer/index.vue

@@ -31,7 +31,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/task/see/index.vue

@@ -34,7 +34,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 68 - 31
src/views/purchase/transferOrder/add.vue

@@ -11,7 +11,7 @@
         </el-col>
         <el-col :span="1.5">
             <el-form-item label="订单类型">
-              <el-select v-model="basicForm.billType" size="small" style="width: 200px" clearable>
+              <el-select v-model="basicForm.billType" :disabled="sonDisable" size="small" style="width: 200px" clearable>
                 <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
                 </el-option>
               </el-select>
@@ -22,6 +22,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -32,6 +33,7 @@
               <el-date-picker
                 v-model="basicForm.billDate"
                 size="small"
+                :disabled="sonDisable"
                 type="date"
                 clearable
                 value-format="yyyy-MM-dd"
@@ -41,13 +43,10 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调拨方式">
-              <el-input
-                v-model="basicForm.allotType"
-                size="small"
-                placeholder=""
-                clearable
-                style="width: 200px"
-              />
+              <el-select v-model="basicForm.allotType" disabled size="small" style="width: 200px" clearable>
+                <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
+                </el-option>
+              </el-select>
             </el-form-item>
          </el-col>
         <el-col :span="1.5">
@@ -55,7 +54,7 @@
               <el-input
                 v-model="basicForm.deliveryCode"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -66,7 +65,7 @@
               <el-input
                 v-model="basicForm.storageCode"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -118,6 +117,7 @@
               <el-input
                 v-model="basicForm.onRouteAffilliation"
                 size="small"
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -128,7 +128,7 @@
               <el-input
                 v-model="basicForm.qty"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -139,7 +139,7 @@
               <el-input
                 v-model="basicForm.accountPath"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -150,7 +150,7 @@
               <el-input
                 v-model="basicForm.customer"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -161,7 +161,7 @@
               <el-input
                 v-model="basicForm.storageWarehouse"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -172,7 +172,7 @@
               <el-input
                 v-model="basicForm.deliveryWarehouse"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -180,7 +180,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="物流项目组">
-              <el-select v-model="basicForm.materialProject" size="small" style="width: 200px" clearable>
+              <el-select v-model="basicForm.materialProject" :disabled="sonDisable" size="small" style="width: 200px" clearable>
                 <el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
                 </el-option>
               </el-select>
@@ -205,7 +205,7 @@
               <el-input
                 v-model="basicForm.remark"
                 size="small"
-                placeholder=""
+                :disabled="sonDisable"
                 clearable
                 style="width: 200px"
               />
@@ -224,7 +224,7 @@
       <el-tabs style="margin-top: 10px;" type="border-card">
         <el-tab-pane label="物料信息">
           <div class="btn_grooup">
-            <el-button type="primary" size="small" @click="addLine">增行</el-button>
+            <el-button type="primary" size="small" v-if="!sonDisable" @click="addLine">增行</el-button>
           </div>
           <el-table
           :data="materialInfo" 
@@ -429,7 +429,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -440,7 +440,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -451,7 +451,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -462,7 +462,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -477,7 +477,7 @@
               <el-input
                 v-model="basicForm.createByName"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -488,7 +488,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -499,7 +499,7 @@
               <el-input
                 v-model="basicForm.updateByName"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -510,7 +510,7 @@
               <el-input
                 v-model="basicForm.code"
                 size="small"
-                placeholder=""
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -540,13 +540,15 @@
 <script>
 import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
 import Refers from '@/components/Refers/refers.vue'
+// 用于回显参照框数据
+import { getRefer } from '@/api/purchase/basic.js'
 import TreeRefers from '@/components/Refers/treeRefer.vue'
 // 明细行选择物料参照
 import popDialog from '@/components/PopDialog/index.vue'
 
 export default {
   name: 'addOder',
-  dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status'],
+  dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status', 'sys_to_type'],
   props: ['pageStu','row', 'disable'],
   components: {
     Refers,
@@ -672,10 +674,39 @@ export default {
       getOrderDetail(row.id).then(res => {
         if (res.code === 200) {
           this.basicForm = res.data
-          // this.materialInfo = res.data.stAllotMaterialList
-          // this.receiveInfo = res.data.stAllotReceiveDeliverList
-          // this.priceList = res.data.stAllotReceiveExecuteList
-          // this.resultList = res.data.stAllotReceiveExpenseList
+          this.materialInfo = res.data.stAllotMaterialList
+          this.receiveInfo = res.data.stAllotReceiveDeliverList
+          this.priceList = res.data.stAllotReceiveExecuteList
+          this.resultList = res.data.stAllotReceiveExpenseList
+          if(this.basicForm.deliveryInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.deliveryInventoryOrg, '调出库存组织') }
+          if(this.basicForm.storageInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.storageInventoryOrg, '调入库存组织') }
+          if(this.basicForm.businessPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.businessPersonal) }
+          if(this.basicForm.deliveryDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.deliveryDept) }
+          if(this.basicForm.currency) { this.reBackRefer('CURRENCY_PARAM', this.basicForm.currency) }
+          if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
+        }
+      })
+    },
+    // 回显参照框
+    reBackRefer(type, id, title) {
+      getRefer({ type: type, id: id, title: title }).then(res => {
+        if (type == 'ORG_PARAM' && title == '调出库存组织') {
+          this.chuOrgOptions = res.rows
+        }
+        if (type == 'ORG_PARAM' && title == '调入库存组织') {
+          this.ruOrgOptions = res.rows
+        }
+        if (type == 'CONTACTS_PARAM') {
+          this.manOptions = res.rows
+        }
+        if (type == 'DEPT_PARAM') {
+          this.deptOptions = res.rows
+        }
+        if (type == 'CURRENCY_PARAM') {
+          this.currencyOptions = res.rows
+        }
+        if (type == 'LIACENTER_PARAM') {
+          this.liacenterOptions = res.rows
         }
       })
     },
@@ -741,6 +772,12 @@ export default {
         this.basicForm.storageInventoryOrg = selection[0].id
         this.basicForm.storageInventoryOrgName = selection[0].name
         this.basicForm.onRouteAffilliation = selection[0].name
+        // 选择调入库存组织时判断调拨方式
+        if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
+          this.basicForm.allotType = '4'
+        } else {
+          this.basicForm.allotType = '2'
+        }
       }
       if (this.referCondition.title == '调出业务员') {
         this.manOptions = selection

+ 17 - 7
src/views/purchase/transferOrder/index.vue

@@ -96,9 +96,12 @@
           :data="tableList" 
           fit
           show-summary
+          highlight-current-row
           max-height="680"
+          ref="multipleTable"
+          @row-click="select"
         >
-          <el-table-column label="调出库存" align="center" prop="code"/>
+          <el-table-column label="调出库存" align="center" prop="deliveryInventoryOrgName"/>
           <el-table-column label="订单类型" align="center" prop="billType"/>
           <el-table-column label="单据号" align="center" prop="code"/>
           <el-table-column label="单据日期" align="center" prop="billDate"/>
@@ -162,20 +165,20 @@
             <el-table-column label="行号" align="center" prop="rowno"/>
             <el-table-column label="物料编码" align="center" prop="material"/>
             <el-table-column label="物料名称" align="center" prop="materialName"/>
-            <el-table-column label="调拨出库单号" align="center" prop="code"/>
-            <el-table-column label="调拨入库单号" align="center" prop="code"/>
-            <el-table-column label="规格" align="center" prop="code"/>
+            <el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
+            <el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
+            <el-table-column label="规格" align="center" prop="specification"/>
             <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
             <el-table-column label="产地" align="center" prop="originPlace"/>
             <el-table-column label="型号" align="center" prop="model"/>
-            <el-table-column label="单位" align="center" prop="unit"/>
-            <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
+            <el-table-column label="单位" align="center" prop="unitName"/>
+            <!-- <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
             <el-table-column label="数量" align="center" prop="qty"/>
             <el-table-column label="主单位" align="center" prop="mainUnit"/>
             <el-table-column label="换算率" align="center" prop="equation"/>
             <el-table-column label="主数量" align="center" prop="mainQty"/>
             <el-table-column label="税率" align="center" prop="rate"/>
-            <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
+            <!-- <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/> -->
             <el-table-column label="批次号" align="center" prop="patchNo"/>
             <el-table-column label="产品批号" align="center" prop="producBatch"/>
             <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
@@ -191,6 +194,7 @@
             <el-table-column label="pi码" align="center" prop="pi"/>
             <!-- <el-table-column label="无税金额" align="center" prop="code"/> -->
             <!-- <el-table-column label="备注" align="center" prop="code"/> -->
+            <el-table-column label="类别" align="center" prop="classify"/>
             <el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
             <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
             </el-table>
@@ -360,6 +364,7 @@ export default {
         if (res.code === 200) {
           this.tableList = res.rows
           this.total = res.total
+          this.materialInfo = res.rows[0].stAllotMaterialList
         }
       })
     },
@@ -380,6 +385,11 @@ export default {
       this.rowDetail = row
       this.disable = false
     },
+    // 选中某行
+    select(row) {
+      console.log('选中', row)
+      this.materialInfo = row.stAllotMaterialList
+    },
     // 行内删除
     deleteids(row) {
       console.log('row', row)

+ 2 - 2
vue.config.js

@@ -37,12 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        // target: `http://test-sy.derom.com/drp-admin`, //测试
+        target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地