Эх сурвалжийг харах

【调拨订单】详情:
1.调出/入库存组织控制调出/入仓库、调出/入部门是否禁用;
2.调出/入货位通过调出/入仓库的csFlag表示判断禁用
3.增加复制、流程跳转、提交功能

002390 1 жил өмнө
parent
commit
8bf5e05823

+ 5 - 163
src/views/purchase/transferOrder/add/columns.js

@@ -1,4 +1,4 @@
-export default function useColumns(type) {
+export default function useColumns() {
 
   const FormColumns = [
     {
@@ -26,15 +26,6 @@ export default function useColumns(type) {
         clearable: true,
       }
     },
-    // {
-    //   item: { key: "allotType", title: "调拨方式", },
-    //   attr: {
-    //     is: "el-select",
-    //     dictName: "sys_to_type",
-    //     clearable: true,
-    //     disabled: true,
-    //   }
-    // },
     {
       item: { key: "status", title: "单据状态", },
       attr: {
@@ -43,18 +34,6 @@ export default function useColumns(type) {
         disabled: true,
       }
     },
-    // {
-    //   item: { key: "currencyName", title: "币种", },
-    //   attr: {
-    //     is: "el-popover-select-v2",
-    //     valueKey: "name",
-    //     referName: "CURRENCY_PARAM",
-    //     dataMapping: {
-    //       currency: "id",
-    //     },
-    //     clearable: true,
-    //   }
-    // },
     {
       item: { key: "qty", title: "总数量", },
       attr: {
@@ -63,23 +42,6 @@ export default function useColumns(type) {
         disabled: true,
       }
     },
-    // {
-    //   item: { key: "accountPath", title: "结算路径", },
-    //   attr: {
-    //     is: "el-input",
-    //     clearable: true,
-    //   }
-    // },
-    // {
-    //   item: { key: "rate", title: "折本汇率", },
-    //   attr: {
-    //     is: "el-input-number",
-    //     max: 10,
-    //     step: 0.1,
-    //     precision: 2,
-    //     disabled: true,
-    //   }
-    // },
     {
       item: { key: "customerName", title: "客户", required: true, },
       attr: {
@@ -92,34 +54,6 @@ export default function useColumns(type) {
         },
       }
     },
-    // {
-    //   item: { key: "materialProject", title: "物流项目组", },
-    //   attr: {
-    //     is: "el-select",
-    //     dictName: "sys_project_group",
-    //     clearable: true,
-    //   }
-    // },
-    // {
-    //   item: { key: "liacenterName", title: "利润中心", },
-    //   attr: {
-    //     is: "el-popover-select-v2",
-    //     valueKey: "name",
-    //     referName: "LIACENTER_PARAM",
-    //     dataMapping: {
-    //       liacenter: "id",
-    //     },
-    //     clearable: true,
-    //   }
-    // },
-    // {
-    //   item: { key: "onRouteAffilliation", title: "在途归属", },
-    //   attr: {
-    //     is: "el-input",
-    //     clearable: true,
-    //     disabled: true,
-    //   }
-    // },
     {
       item: { key: "remark", title: "备注", },
       attr: {
@@ -147,6 +81,7 @@ export default function useColumns(type) {
         referName: "WAREHOUSE_PARAM",
         dataMapping: {
           deliveryWarehouse: "id",
+          dwCsFlag: "csFlag",
         },
         queryParams: (params) => ({
           pkOrg: params.deliveryInventoryOrg,
@@ -203,6 +138,7 @@ export default function useColumns(type) {
         referName: "WAREHOUSE_PARAM",
         dataMapping: {
           storageWarehouse: "id",
+          swCsFlag: "csFlag",
         },
         queryParams: (params) => ({
           pkOrg: params.storageInventoryOrg,
@@ -280,7 +216,7 @@ export default function useColumns(type) {
       }
     },
     {
-      item: { key: "isSendWms", title: "同步NC结果", span: 12 },
+      item: { key: "sendNcRes", title: "同步NC结果", span: 12 },
       attr: {
         is: "el-input",
         type: "textarea",
@@ -315,6 +251,7 @@ export default function useColumns(type) {
               materialName: "name",
               specification: "specification",
               model: "model",
+              unit: "unitId",
               unitName: "unitIdName",
               manufacturer: "manufacturerIdName",
               originPlace: "originPlace",
@@ -360,10 +297,6 @@ export default function useColumns(type) {
           item: { key: "originPlaceName", title: "产地", },
           attr: {}
         },
-        // {
-        //   item: { key: "mainUnitName", title: "主单位", },
-        //   attr: {}
-        // },
         {
           item: { key: "storageDeptName", title: "调入部门", require: true, },
           attr: {
@@ -388,31 +321,6 @@ export default function useColumns(type) {
             // clearable: true,
           }
         },
-        // {
-        //   item: { key: "deliveryCode", title: "调拨出库单号", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "storageCode", title: "调拨入库单号", },
-        //   attr: {}
-        // },
-
-        // {
-        //   item: { key: "equation", title: "换算率", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "mainQty", title: "主数量", },
-        //   attr: {
-        //     is: "el-input-number",
-        //     min: 0,
-        //     clearable: true,
-        //   }
-        // },
-        // {
-        //   item: { key: "rate", title: "税率", },
-        //   attr: {}
-        // },
         {
           item: { key: "deliveryAllocationName", title: "调出货位", },
           attr: {
@@ -437,72 +345,6 @@ export default function useColumns(type) {
             clearable: true,
           }
         },
-        // {
-        //   item: { key: "manufactureDate", title: "生产日期", },
-        //   attr: {
-        //     is: "el-date-picker",
-        //     type: "date",
-        //     valueFormat: "yyyy-MM-dd",
-        //   }
-        // },
-        // {
-        //   item: { key: "periodEndDate", title: "有效期至/失效日期", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "ratifyCode", title: "批准文号", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "registration", title: "注册证号", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "productCode", title: "商品名", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "commonCode", title: "通用名", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "drug", title: "剂型", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "ruleDetail", title: "调入调出结算规则明细", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "marketingApprovalPersonal", title: "上市许可持有人", },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "production", title: "生产许可证号/经营许可证号/备案凭证号", width: 270 },
-        //   attr: {}
-        // },
-        // {
-        //   item: { key: "pi", title: "pi码", },
-        //   attr: {
-
-        //   }
-        // },
-        // {
-        //   item: { key: "classify", title: "类别", },
-        //   attr: {
-
-        //   }
-        // },
-        // {
-        //   item: { key: "customerLogistic", title: "客户物料码", },
-        //   attr: {
-
-        //   }
-        // },
-        // {
-        //   item: { key: "customerLogisticName", title: "客户物料名称", },
-        //   attr: {}
-        // },
       ]
     },
     // 收发货信息

+ 185 - 50
src/views/purchase/transferOrder/add/index.vue

@@ -1,6 +1,7 @@
 <script>
 import useColumns from "./columns";
 import { toOA } from "@/api/purchase/purchaseDemand.js";
+import { REFER } from "@/components/popover-select/api";
 import {
   addOrder,
   getOrderDetail,
@@ -42,7 +43,11 @@ export default {
     const rules = this.$init.rules([...TabColumns, ...FormColumns]);
     return {
       rules,
-      params,
+      params: {
+        ...params,
+        dwCsFlag: null,
+        swCsFlag: null,
+      },
       tabName,
       TabColumns,
       FormColumns,
@@ -109,7 +114,11 @@ export default {
           },
         ],
       } = useColumns();
-      this.params = this.$init.params([...TabColumns, ...FormColumns]);
+      this.params = {
+        ...this.$init.params([...TabColumns, ...FormColumns]),
+        dwCsFlag: null,
+        swCsFlag: null,
+      };
       this.tabName = tabName;
       this.TabColumn = TabColumns;
       this.$refs["superForm"].clearValidate();
@@ -132,48 +141,79 @@ export default {
         };
       } else {
         await this.fetchItem(data);
+        this.$nextTick(async () => {
+          // 复制
+          if (addType === "add") {
+            const { name, nickName } = this.$store.state.user;
+            this.params = {
+              ...this.params,
+              id: "",
+              code: "",
+              oaId: "",
+              ncCode: "",
+              status: "0",
+              sendNcRes: "",
+              updateBy: "",
+              updateByName: "",
+              updateTime: "",
+              storageCode: "",
+              deliveryCode: "",
+              createBy: name,
+              createByName: nickName,
+              billDate: new Date().Format("yyyy-MM-dd"),
+              createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
+              stAllotMaterialList: this.params.stAllotMaterialList.map(
+                (item) => ({
+                  ...item,
+                  id: "",
+                  allotId: "",
+                  allotDate: "",
+                  deliveryCode: "",
+                  storageCode: "",
+                  createBy: name,
+                  createByName: nickName,
+                  updateBy: null,
+                  updateByName: null,
+                  createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
+                  updateTime: null,
+                })
+              ),
+            };
+          }
+          // 调入/出货位禁用——根据调入/出仓库
+          const { deliveryWarehouse, storageWarehouse } = this.params;
+          this.params.dwCsFlag = await this.fetchWarehouse(deliveryWarehouse);
+          this.params.swCsFlag = await this.fetchWarehouse(storageWarehouse);
+        });
       }
-      // if (addType === "see") {
-      //   const { TabColumns } = useColumns();
-      //   let Columns = _.cloneDeep(TabColumns);
-      //   this.TabColumns = Columns.map((tab, index) => ({
-      //     ...tab,
-      //     TableColumns: tab.TableColumns.map(({ item, attr }) => ({
-      //       item,
-      //       attr: {
-      //         ...attr,
-      //         disabled: true,
-      //       },
-      //     })),
-      //   }));
-      // }
+    },
+    // 查询仓库
+    async fetchWarehouse(id) {
+      try {
+        let { code, rows } = await REFER(
+          {
+            type: "WAREHOUSE_PARAM",
+            search: "",
+            id,
+            isPage: true,
+          },
+          { pageNum: 1, pageSize: 10 }
+        );
+        return rows[0] ? rows[0].csFlag : null;
+      } catch (error) {}
     },
     //
     async fetchItem(prop) {
       try {
         this.loading = true;
         const { addType } = this.$props;
-        const { name, nickName } = this.$store.state.user;
+
         let { code, data, msg } = await getOrderDetail(prop.id);
         if (code == 200) {
           this.params = {
+            ...this.params,
             ...data,
-            stAllotReceiveDeliverList: [],
-            stAllotReceiveExecuteList: [],
-            stAllotReceiveExpenseList: [],
           };
-          // 复制
-          if (addType === "add") {
-            this.params = {
-              ...data,
-              id: "",
-              status: "0",
-              createBy: name,
-              createByName: nickName,
-              billDate: new Date().Format("yyyy-MM-dd"),
-              createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
-            };
-          }
         }
       } catch (error) {
       } finally {
@@ -220,6 +260,7 @@ export default {
                 : await editOrder(params);
             if (code == 200) {
               this.$notify.success(msg);
+              this.hide();
             }
           } catch (error) {
           } finally {
@@ -230,16 +271,59 @@ export default {
           for (let key in obj) {
             fail.push(obj[key][0].message);
           }
-          this.$notify({
+          this.$notify.warning({
+            title: "警告",
             message: fail[0],
-            type: "warning",
           });
           return false;
         }
       });
     },
     // 提交
-    useCommit(prop) {},
+    async useCommit(prop) {
+      this.$modal.confirm("是否确认提交?").then(async () => {
+        try {
+          this.$modal.loading("处理中,请稍后...");
+          let { code, msg } = await submitOrder(this.params);
+          if (code == 200) {
+            this.$notify.success(msg);
+            this.hide();
+          }
+        } catch (error) {
+        } finally {
+          this.$modal.closeLoading();
+        }
+      });
+    },
+    // 流程跳转
+    async useJumpOA() {
+      try {
+        const {
+          $store: {
+            state: { user },
+          },
+          params,
+        } = this;
+        let { code, oaUrl } = await toOA(user.name, params.oaId);
+        if (code == 200) {
+          window.open(oaUrl);
+        }
+      } catch (error) {}
+    },
+    // 重传NC
+    async sendToNC() {
+      try {
+        this.$modal.loading("处理中,请稍后...");
+        let { code, msg } = await againToNC(this.params);
+        if (code == 200) {
+          this.$notify.success(msg);
+          this.hide();
+        }
+      } catch (error) {
+      } finally {
+        this.$modal.closeLoading();
+      }
+    },
   },
   created() {},
 };
@@ -247,15 +331,15 @@ export default {
 
 <template>
   <el-drawer
+    v-loading="loading"
     v-bind="$attrs"
     v-on="$listeners"
     :size="width"
+    :show-close="false"
     :visible.sync="visible"
     destroy-on-close
-    :show-close="false"
     @close="hide"
     @open="beforeOpen"
-    v-loading="loading"
   >
     <div
       slot="title"
@@ -264,20 +348,39 @@ export default {
       <h3>{{ title }}</h3>
       <div>
         <el-button
+          v-if="addType !== 'see'"
           type="primary"
           :size="$attrs.size"
           :loading="loading"
           @click="useSave('superForm')"
           >保 存</el-button
         >
-        <el-button
-          v-show="addType === 'see'"
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useCommit('superForm')"
-          >提 交</el-button
-        >
+
+        <el-button-group v-else style="margin: 0 8px">
+          <el-button
+            v-show="params.status == '0' || params.status == '3'"
+            type="primary"
+            :size="$attrs.size"
+            :loading="loading"
+            @click="useCommit('superForm')"
+            >提 交</el-button
+          >
+          <el-button
+            type="primary"
+            :size="size"
+            @click="sendToNC"
+            v-show="params.status == '2'"
+            >重传NC</el-button
+          >
+          <el-button
+            :size="$attrs.size"
+            @click="useJumpOA"
+            v-show="
+              (params.status == '1' || params.status == '2') && params.oaId
+            "
+            >流程跳转</el-button
+          >
+        </el-button-group>
 
         <el-button :size="$attrs.size" :loading="loading" @click="hide"
           >取 消</el-button
@@ -296,15 +399,39 @@ export default {
       style="padding: 20px"
       :disabled="addType === 'see'"
     >
-      <!-- <template slot="puOrgName" slot-scope="scope">
+      <!-- 调出仓库 -->
+      <template slot="deliveryWarehouseName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!params.deliveryInventoryOrg"
+        >
+        </component
+      ></template>
+      <!-- 调出部门 -->
+      <template slot="deliveryDeptName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!params.deliveryInventoryOrg"
+        >
+        </component
+      ></template>
+      <!-- 调入仓库 -->
+      <template slot="storageWarehouseName" slot-scope="scope">
         <component
           v-bind="scope.attr"
           v-model="scope.row[scope.item.key]"
           :size="$attrs.size"
           :source.sync="scope.row"
+          :disabled="!params.storageInventoryOrg"
         >
         </component
-      ></template> -->
+      ></template>
     </el-super-form>
 
     <div style="position: relative">
@@ -354,7 +481,7 @@ export default {
                 v-model="scope.row[scope.item.key]"
                 :size="$attrs.size"
                 :source.sync="scope.row"
-                :disabled="addType === 'see'"
+                :disabled="addType === 'see' || !params.storageInventoryOrg"
                 :queryParams="
                   () => ({
                     drpOrg: params.storageInventoryOrg,
@@ -370,7 +497,11 @@ export default {
                 v-model="scope.row[scope.item.key]"
                 :size="$attrs.size"
                 :source.sync="scope.row"
-                :disabled="addType === 'see'"
+                :disabled="
+                  addType === 'see' ||
+                  !params.dwCsFlag ||
+                  params.dwCsFlag === 'N'
+                "
               >
               </component>
             </template>
@@ -381,7 +512,11 @@ export default {
                 v-model="scope.row[scope.item.key]"
                 :size="$attrs.size"
                 :source.sync="scope.row"
-                :disabled="addType === 'see'"
+                :disabled="
+                  addType === 'see' ||
+                  !params.swCsFlag ||
+                  params.swCsFlag === 'N'
+                "
               >
               </component>
             </template>

+ 44 - 115
src/views/purchase/transferOrder/columns.js

@@ -33,14 +33,14 @@ export default function useColumns() {
       item: { key: "allotType", title: "调拨方式", width: 100 },
       attr: { is: "el-dict-tag", dictName: "sys_to_type", },
     },
-    {
-      item: { key: "deliveryCode", title: "调拨出库单号", },
-      attr: {},
-    },
-    {
-      item: { key: "storageCode", title: "调拨入库单号", },
-      attr: {},
-    },
+    // {
+    //   item: { key: "deliveryCode", title: "调拨出库单号", },
+    //   attr: {},
+    // },
+    // {
+    //   item: { key: "storageCode", title: "调拨入库单号", },
+    //   attr: {},
+    // },
     {
       item: { key: "storageInventoryOrgName", title: "调拨入库组织", },
       attr: {},
@@ -53,26 +53,26 @@ export default function useColumns() {
       item: { key: "deliveryDeptName", title: "调出部门", width: 100 },
       attr: {},
     },
-    {
-      item: { key: "currencyName", title: "币种", width: 100 },
-      attr: {},
-    },
-    {
-      item: { key: "rate", title: "折本汇率", width: 80 },
-      attr: {},
-    },
-    {
-      item: { key: "onRouteAffilliation", title: "在途归属", },
-      attr: {},
-    },
+    // {
+    //   item: { key: "currencyName", title: "币种", width: 100 },
+    //   attr: {},
+    // },
+    // {
+    //   item: { key: "rate", title: "折本汇率", width: 80 },
+    //   attr: {},
+    // },
+    // {
+    //   item: { key: "onRouteAffilliation", title: "在途归属", },
+    //   attr: {},
+    // },
     {
       item: { key: "qty", title: "总数量", width: 100 },
       attr: { isSummary: true, },
     },
-    {
-      item: { key: "accountPath", title: "结算路径", },
-      attr: {},
-    },
+    // {
+    //   item: { key: "accountPath", title: "结算路径", },
+    //   attr: {},
+    // },
     {
       item: { key: "customerName", title: "客户", },
       attr: {},
@@ -85,20 +85,20 @@ export default function useColumns() {
       item: { key: "storageWarehouseName", title: "调入仓库", },
       attr: {},
     },
-    {
-      item: { key: "materialProject", title: "物流项目组", },
-      attr: {},
-    },
-    {
-      item: { key: "liacenterName", title: "利润中心", },
-      attr: {},
-    },
+    // {
+    //   item: { key: "materialProject", title: "物流项目组", },
+    //   attr: {},
+    // },
+    // {
+    //   item: { key: "liacenterName", title: "利润中心", },
+    //   attr: {},
+    // },
     {
       item: { key: "remark", title: "备注", },
       attr: {},
     },
     {
-      item: { key: "createTime", title: "制单日期", width: 100 },
+      item: { key: "createTime", title: "制单日期" },
       attr: {},
     },
 
@@ -136,11 +136,11 @@ export default function useColumns() {
           attr: {},
         },
         {
-          item: { key: "deliveryCode", title: "调拨出库单号", },
+          item: { key: "qty", title: "数量", width: 120 },
           attr: {},
         },
         {
-          item: { key: "storageCode", title: "调拨入库单号", },
+          item: { key: "unitName", title: "单位", width: 120 },
           attr: {},
         },
         {
@@ -148,43 +148,19 @@ export default function useColumns() {
           attr: {},
         },
         {
-          item: { key: "manufacturer", title: "生产厂家/代理人", },
-          attr: {},
-        },
-        {
-          item: { key: "originPlace", title: "产地", },
-          attr: {},
-        },
-        {
           item: { key: "model", title: "型号", width: 100 },
           attr: {},
         },
         {
-          item: { key: "unitName", title: "单位", width: 60 },
-          attr: {},
-        },
-        {
-          item: { key: "qty", title: "数量", width: 100 },
-          attr: {},
-        },
-        {
-          item: { key: "mainUnit", title: "主单位", },
-          attr: {},
-        },
-        {
-          item: { key: "equation", title: "换算率", width: 100 },
-          attr: {},
-        },
-        {
-          item: { key: "mainQty", title: "主数量", width: 100 },
+          item: { key: "manufacturer", title: "生产厂家/代理人", },
           attr: {},
         },
         {
-          item: { key: "rate", title: "税率", width: 100 },
+          item: { key: "originPlace", title: "产地", },
           attr: {},
         },
         {
-          item: { key: "patchNo", title: "批次号", },
+          item: { key: "storageDeptName", title: "调入部门", },
           attr: {},
         },
         {
@@ -192,64 +168,17 @@ export default function useColumns() {
           attr: {},
         },
         {
-          item: { key: "manufactureDate", title: "生产日期", },
-          attr: {},
-        },
-        {
-          item: { key: "periodEndDate", title: "有效期至/失效日期", },
-          attr: {},
-        },
-        {
-          item: { key: "ratifyCode", title: "批准文号", },
-          attr: {},
-        },
-        {
-          item: { key: "registration", title: "注册证号", },
-          attr: {},
-        },
-        {
-          item: { key: "productCode", title: "商品名", width: 100 },
-          attr: {},
-        },
-        {
-          item: { key: "commonCode", title: "通用名", },
-          attr: {},
+          item: { key: "deliveryAllocationName", title: "调出货位", },
+          attr: {}
         },
         {
-          item: { key: "drug", title: "剂型", width: 120 },
-          attr: {},
-        },
-        {
-          item: { key: "ruleDetail", title: "调入调出结算规则明细", },
-          attr: {},
-        },
-        {
-          item: { key: "marketingApprovalPersonal", title: "上市许可持有人", },
-          attr: {},
-        },
-        {
-          item: { key: "production", title: "生产许可证号/经营许可证号/备案凭证号", },
-          attr: {},
-        },
-        {
-          item: { key: "pi", title: "pi码", width: 100 },
-          attr: {},
-        },
-        {
-          item: { key: "classify", title: "类别", width: 100 },
-          attr: {},
-        },
-        {
-          item: { key: "customerLogistic", title: "客户物料码", },
-          attr: {},
-        },
-        {
-          item: { key: "customerLogisticName", title: "客户物料名称", },
-          attr: {},
+          item: { key: "storageAllocationName", title: "调入货位", },
+          attr: {}
         },
+
       ].map(({ item, attr }) => ({
         attr,
-        item: { ...item, width: item.width || 150 },
+        item: { ...item, width: item.width || 180 },
       }))
     },
     // 收发货信息

+ 46 - 31
src/views/purchase/transferOrder/index.vue

@@ -17,7 +17,13 @@
       <el-col :span="24" style="text-align: right">
         <el-button-group style="margin-right: 5px">
           <el-button type="primary" :size="size" @click="addOrder"
-            >新增</el-button
+            >新 增</el-button
+          >
+          <el-button
+            :disabled="selectData.length !== 1"
+            :size="size"
+            @click="addOrder(selectData)"
+            >复 制</el-button
           >
         </el-button-group>
         <BatchImport
@@ -36,13 +42,15 @@
       :page="page"
       :columns="TableColumns"
       index
+      checkbox
       pagination
-      :height="400"
       showSummary
+      :height="400"
       convenitentOperation
       storage-key="TransferOrderSuperTable"
       @row-click="select"
       @row-dblclick="useSee"
+      @select="useSelectChange"
       @pagination="getList(params, page)"
     >
       <ux-table-column fixed="right" title="操作" align="center" width="160">
@@ -147,6 +155,7 @@ export default {
       TableColumns,
       TabColumns,
       SearchColumns,
+      selectData: [],
       tabName: "materialInfo",
       size: "mini",
       loading: false,
@@ -194,24 +203,23 @@ export default {
       };
       this.getList(this.params, this.page);
     },
-    getList(params, page) {
-      this.loading = true;
-      getOrderList({
-        ...this.addDateRange(params, params.billDates),
-        ...page,
-      })
-        .then((res) => {
-          if (res.code === 200) {
-            this.tableList = res.rows;
-            this.page.total = res.total;
-          }
-          this.loading = false;
-        })
-        .then(() => {
-          // 合计不显示重绘
-          this.$refs.multipleTable.doLayout();
-        })
-        .catch((err) => {});
+    //
+    async getList(params, page) {
+      try {
+        this.loading = true;
+        this.selectData = [];
+        let { code, msg, rows, total } = await getOrderList({
+          ...this.addDateRange(params, params.billDates),
+          ...page,
+        });
+        if (code === 200) {
+          this.tableList = rows;
+          this.page.total = total;
+        }
+      } catch (error) {
+      } finally {
+        this.loading = false;
+      }
     },
     getlistStAllotItem(pid) {
       this.itemLoading = true;
@@ -220,12 +228,15 @@ export default {
         this.itemLoading = false;
       });
     },
+    useSelectChange(selection, row) {
+      this.selectData = selection;
+    },
     // 新 增
-    addOrder() {
+    addOrder(prop) {
       const { setVisible } = this.$refs.AddTransfer;
       setVisible(true);
       this.pageStu = "add";
-      this.rowDetail = {};
+      this.rowDetail = prop[0] ? prop[0] : {};
     },
     // 查 看
     useSee(row) {
@@ -242,18 +253,22 @@ export default {
       this.rowDetail = row;
     },
     commit(row) {
-      this.$modal.loading("提交中...");
-      submitOrder(row)
-        .then((res) => {
-          if (res.code === 200) {
+      this.$modal
+        .confirm("是否确认提交?")
+        .then(async () => {
+          try {
+            this.$modal.loading("提交中...");
+            let { code, msg } = await submitOrder(row);
+            if (code == 200) {
+              this.$notify.success(msg);
+              this.getList(this.params, this.page);
+            }
+          } catch (error) {
+          } finally {
             this.$modal.closeLoading();
-            this.$modal.notifySuccess("提交成功");
-            this.getList(this.params, this.page);
           }
         })
-        .catch((err) => {
-          this.$modal.closeLoading();
-        });
+        .catch(() => {});
     },
     // 选中某行
     select(row) {