Przeglądaj źródła

Merge remote-tracking branch 'origin/dev' into dev

001295 1 rok temu
rodzic
commit
8132756618

+ 67 - 0
src/components/query-scheme/index.vue

@@ -15,6 +15,73 @@ export default {
       type: Array,
       default: () => [],
     },
+    // candidate: [
+    //   {
+    //     item: {
+    //       key: "orderCode",
+    //       title: "订单编号",
+    //     },
+    //     attr: {
+    //       clearable: true,
+    //       is: "el-input",
+    //       placeholder: "请输入订单编号,多个使用,隔开",
+    //     },
+    //   },
+    //   {
+    //     item: {
+    //       key: "materialCode",
+    //       title: "物料编码",
+    //     },
+    //     attr: {
+    //       clearable: true,
+    //       is: "el-input",
+    //       placeholder: "请输入物料编码,多个使用,隔开",
+    //       // is: "el-popover-multiple-select-v2",
+    //       // valueKey: "code",
+    //       // referName: "MATERIAL_PARAM",
+    //     },
+    //   },
+    //   {
+    //     item: {
+    //       key: "date",
+    //       title: "订单日期",
+    //     },
+    //     attr: {
+    //       clearable: true,
+    //       is: "el-date-picker",
+    //       type: "daterange",
+    //       unlinkPanels: true,
+    //       rangeSeparator: "至",
+    //       valueFormat: "yyyy-MM-dd",
+    //       endPlaceholder: "结束日期",
+    //       startPlaceholder: "开始日期",
+    //       value: [],
+    //     },
+    //   },
+    //   {
+    //     item: {
+    //       key: "puOrgIds",
+    //       title: "采购组织",
+    //     },
+    //     attr: {
+    //       clearable: true,
+    //       is: "el-popover-multiple-select-v2",
+    //       valueKey: "id",
+    //       referName: "ORG_PARAM",
+    //     },
+    //   },
+    //   {
+    //     item: {
+    //       key: "source",
+    //       title: "订单来源",
+    //     },
+    //     attr: {
+    //       clearable: true,
+    //       is: "el-select",
+    //       dictName: "order_source",
+    //     },
+    //   },
+    // ],
   },
   data() {
     return {

+ 1 - 1
src/views/purchase/PurchaseDemandList/add.vue

@@ -2419,7 +2419,7 @@ export default {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName =
           selection[0].name;
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress =
-          selection[0].code;
+          selection[0].id;
         this.basicForm.puDemandItemList[this.tableIndex].contacts =
           selection[0].contactsName;
         this.basicForm.puDemandItemList[this.tableIndex].contactsPhone =

+ 18 - 0
src/views/purchase/purchase-order/add/column.js

@@ -594,6 +594,15 @@ const PurchaseTabColumns = [
         inputType: "Checkbox",
       },
       {
+        key: "deliveryDate",
+        title: "交货日期",
+        inputType: "DatePicker",
+        type: 'date',
+        disabled: true,
+        isShow: true,
+        width: 180,
+      },
+      {
         key: "floatQty",
         title: "未到货数量",
         inputType: "InputNumber",
@@ -1396,6 +1405,15 @@ const CauseTabColumns = [
         isSummary: true,
       },
       {
+        key: "deliveryDate",
+        title: "交货日期",
+        inputType: "DatePicker",
+        type: 'date',
+        disabled: true,
+        isShow: true,
+        width: 180,
+      },
+      {
         key: "goodsWarehouseName",
         title: "收货仓库",
         inputType: "Input",

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

@@ -6,7 +6,6 @@ import {
   initRules,
   initParams,
 } from "@/utils/init/index.js";
-// import { Columns, TabColumns } from "./column";
 import judgeColumns from "./column";
 import { tax, currency } from "@/components/popover-select-v2/fetch";
 import VirtualScroll from "el-table-virtual-scroll";
@@ -265,6 +264,7 @@ export default {
                 v.goodsAllocation = "";
                 v.goodsAllocationName = "";
                 v.sourceBillDate = "";
+                v.deliveryDate = "";
                 v["isInvoice"] && (v["isInvoice"] = "N");
                 v["isStorage"] && (v["isStorage"] = "N");
                 v["isArrival"] && (v["isArrival"] = "N");
@@ -586,6 +586,10 @@ export default {
       // let { type, copy, dataMapping } = props;
       let { params, tabName } = this;
       console.log(val, "val", props, "props", source, "source");
+      const DPtime = val.deliveryPeriod * 24 * 60 * 60 * 1000;
+      source.deliveryDate = new Date(
+        new Date(params.createTime).getTime() + DPtime
+      ).Format("yyyy-MM-dd");
 
       // // 复制
       // if (copy) {
@@ -1229,6 +1233,7 @@ export default {
                     <el-date-picker
                       v-if="cColumn.inputType === 'DatePicker'"
                       v-model="scope.row[cColumn.key]"
+                      :size="size"
                       :type="cColumn.type"
                       :placeholder="cColumn.placeholder"
                       :clearable="cColumn.clearable"

+ 8 - 0
src/views/purchase/purchase-order/column.js

@@ -1002,6 +1002,10 @@ const PurTabColumns = [
         },
       },
       {
+        item: { key: "deliveryDate", title: "交货日期", width: 150, },
+        attr: {},
+      },
+      {
         item: { key: "unarrivedQty", title: "未到货数量", width: 80, },
         attr: {
           isSummary: true,
@@ -1637,6 +1641,10 @@ const CommonTabColumns = [
         },
       },
       {
+        item: { key: "deliveryDate", title: "交货日期", width: 150, },
+        attr: {},
+      },
+      {
         item: { key: "materialClassifyOneName", title: "物料一级分类", width: 100, },
         attr: {
           isHidden: true,

+ 1 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -1189,6 +1189,7 @@ export default {
                     <el-date-picker
                       v-if="cColumn.inputType === 'DatePicker'"
                       v-model="scope.row[cColumn.key]"
+                      :size="size"
                       :type="cColumn.type"
                       :placeholder="cColumn.placeholder"
                       :clearable="cColumn.clearable"

+ 0 - 1
src/views/purchase/purchase-order/he-dan/index.vue

@@ -24,7 +24,6 @@ export default {
     disabled: {
       get() {
         let { innerValue } = this;
-        console.log(innerValue, "innerValue");
         if (innerValue.length > 1) {
           // 0=自由态
           // 1=自动协议直采,2=协议直采,3=手工

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

@@ -1,6 +1,5 @@
 <!-- 采购订单修订—— 列表 -->
 <script>
-// import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column";
 import { judgeColumns, SearchColumns } from "./column";
 import orderApi from "@/api/business/purchase/purchase-order";
 import {
@@ -20,7 +19,6 @@ TabColumns.forEach((column) => {
 
 export default {
   name: "PuchaseOrder",
-  // dicts: initDicts(SelectColumns),
   dicts: [...initDicts(allColumns), "oa_templete_id"],
   components: {
     AddDrawer: () => import("./add/index.vue"),
@@ -50,7 +48,6 @@ export default {
       page: page,
       searchColumns: SearchColumns,
       params: initParams(SearchColumns),
-      // tableColumns: TableColumns,
       tableColumns: Columns,
       tableData: [],
       tabColumns: initTabColumns(),
@@ -67,73 +64,6 @@ export default {
       timer: 300,
       timeOut: null,
       size: "mini",
-      candidate: [
-        {
-          item: {
-            key: "orderCode",
-            title: "订单编号",
-          },
-          attr: {
-            clearable: true,
-            is: "el-input",
-            placeholder: "请输入订单编号,多个使用,隔开",
-          },
-        },
-        {
-          item: {
-            key: "materialCode",
-            title: "物料编码",
-          },
-          attr: {
-            clearable: true,
-            is: "el-input",
-            placeholder: "请输入物料编码,多个使用,隔开",
-            // is: "el-popover-multiple-select-v2",
-            // valueKey: "code",
-            // referName: "MATERIAL_PARAM",
-          },
-        },
-        {
-          item: {
-            key: "date",
-            title: "订单日期",
-          },
-          attr: {
-            clearable: true,
-            is: "el-date-picker",
-            type: "daterange",
-            unlinkPanels: true,
-            rangeSeparator: "至",
-            valueFormat: "yyyy-MM-dd",
-            endPlaceholder: "结束日期",
-            startPlaceholder: "开始日期",
-            value: [],
-          },
-        },
-        {
-          item: {
-            key: "puOrgIds",
-            title: "采购组织",
-          },
-          attr: {
-            clearable: true,
-            is: "el-popover-multiple-select-v2",
-            valueKey: "id",
-            referName: "ORG_PARAM",
-          },
-        },
-        {
-          item: {
-            key: "source",
-            title: "订单来源",
-          },
-          attr: {
-            clearable: true,
-            is: "el-select",
-            dictName: "order_source",
-          },
-        },
-      ],
     };
   },
 
@@ -160,7 +90,6 @@ export default {
     if (this.$route.query.billCode)
       this.params.orderCode = this.$route.query.billCode;
     this.fetchList(this.params, this.page);
-    // this.handleRefreshList();
   },
   methods: {
     async fetchList(data, params) {
@@ -251,9 +180,6 @@ export default {
 
     // 刷新操作
     handleRefreshList() {
-      // this.page.pageNum = 1;
-
-      // this.page.pageSize = 10;
       this.page = this.$init.page();
       this.$refs.purchaseTable.$refs.superTable &&
         this.$refs.purchaseTable.$refs.superTable.clearSelection();
@@ -289,10 +215,6 @@ export default {
 
       copyVal.id && copyVal.id != "" && setCopyParams(copyVal.id);
     },
-    // 复制
-    handleCopy() {
-      this.handleOpenAddDrawer(this.checkedList[0]);
-    },
     // 查看
     async handleOpenSeeDrawer(row) {
       window.clearInterval(this.timeOut);
@@ -481,75 +403,6 @@ export default {
         this.fetchList(this.params, this.page);
       }
     },
-    // 判断“整单退回”按钮
-    judgeIsAllReturn() {
-      if (this.checkedList.length == 1) {
-        // 非手工、状态:自由/驳回
-        if (this.judgeIsOption("return", this.checkedList[0])) {
-          // if (this.checkedList[0].source != 3 &&
-          //     (this.checkedList[0].status == 0 || this.checkedList[0].status == 3)
-          //  ) {
-
-          return false;
-        }
-      }
-      return true;
-    },
-    //  整单退回
-    handleAllReturn() {
-      this.handleReturn(this.checkedList[0].id, []);
-    },
-    // 判断“行退回”按钮
-    judgeIsLineReturn() {
-      if (this.checkedTabList.length == 1) {
-        // 主信息:非手工、状态:自由/驳回
-        if (this.judgeIsOption("return", this.primaryResource)) {
-          // if(this.primaryResource.source != 3 &&
-          //   (this.primaryResource.status == 0 || this.primaryResource.status == 3) ){
-
-          return false;
-        }
-      }
-      return true;
-    },
-    // 行退回
-    handleLineReturn() {
-      let ids = this.checkedTabList.map((checked) => checked.id);
-
-      console.log(ids, "行退回ids");
-
-      this.handleReturn(this.primaryResource.id, ids);
-    },
-    // 退回接口
-    handleReturn(id, documentIds) {
-      this.$prompt("请输入退回原因", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPattern: /\s*\S+?/,
-        inputErrorMessage: "退回原因不能为空",
-      })
-        .then(async ({ value }) => {
-          let data = {
-            id: Number(id),
-
-            documentIds: documentIds.map((ids) => Number(ids)),
-
-            baskCause: value,
-          };
-
-          try {
-            let { code, msg } = await orderApi.documentsReturn(data);
-
-            if (code === 200) {
-              this.handleRefreshList();
-            }
-            this.$notify.success({
-              message: msg,
-            });
-          } catch (error) {}
-        })
-        .catch(() => {});
-    },
 
     // 付款协议
     async handlePaymentRequest() {
@@ -566,16 +419,6 @@ export default {
         }
       } catch (error) {}
     },
-    // 退货
-    async handlePurchaseReturn() {
-      const { id } = this.checkedList[0];
-
-      const { setVisible, fetchStorage } = this.$refs.PurchaseReturnDrawerRef;
-
-      await setVisible(true);
-
-      await fetchStorage(id);
-    },
     // 主表Select框
     handleSelect(selection, row) {
       this.checkedList = selection;
@@ -712,7 +555,7 @@ export default {
           <el-button
             :size="size"
             :disabled="checkedList.length != 1"
-            @click="handleCopy"
+            @click="handleOpenAddDrawer(checkedList[0])"
             >复制</el-button
           >
           <el-button :size="size" @click="handleBatchSubmit"
@@ -724,12 +567,6 @@ export default {
           style="margin-left: 10px"
           :key="checkedList.length + 1"
         >
-          <!-- <el-button
-            :size="size"
-            @click="handleAllReturn"
-            :disabled="judgeIsAllReturn()"
-            >整单退回</el-button
-          > -->
           <th-button
             :size="size"
             :main-data="checkedList"
@@ -743,11 +580,6 @@ export default {
         </el-button-group>
 
         <el-button-group style="margin: 0 10px">
-          <!-- <el-button size="mini" 
-            :disabled="!(checkedList.length == 1 && checkedList[0].deliveryStatus == '0')"
-            :key="checkedList.length"
-            @click="handlePurchaseReturn"
-          >采购退货</el-button> -->
           <el-button :size="size" @click="handlePaymentRequest"
             >付款申请</el-button
           >
@@ -870,12 +702,6 @@ export default {
           :subtabulation="checkedTabList"
           @success="handleRefreshList"
         ></th-button>
-        <!-- <el-button
-          :size="size"
-          @click="handleLineReturn"
-          :disabled="judgeIsLineReturn()"
-          >行退回</el-button
-        > -->
         <hgb-button
           :select-data="checkedTabList"
           :size="size"
@@ -919,12 +745,3 @@ export default {
     </div>
   </el-card>
 </template>
-
-<!-- <style scoped>
->>> .el-message-box__content {
-  max-height: 350px;
-  overflow-y: scroll;
-  overflow-x: auto;
-  box-sizing: border-box;
-}
-</style> -->

+ 12 - 0
src/views/purchase/purchase-order/see/index.vue

@@ -531,6 +531,18 @@ export default {
                       false-label="N"
                     ></el-checkbox>
                   </el-form-item>
+
+                  <el-date-picker
+                    v-if="cColumn.inputType === 'DatePicker'"
+                    v-model="scope.row[cColumn.key]"
+                    :size="size"
+                    :type="cColumn.type"
+                    :placeholder="cColumn.placeholder"
+                    :clearable="cColumn.clearable"
+                    :disabled="cColumn.disabled"
+                    :picker-options="cColumn.pickerOptions"
+                    style="width: 100%"
+                  ></el-date-picker>
                 </template>
               </ux-table-column>
             </ux-grid>