فهرست منبع

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!80
黄梓星 2 سال پیش
والد
کامیت
fd3d3c82d6
26فایلهای تغییر یافته به همراه516 افزوده شده و 418 حذف شده
  1. 2 2
      src/components/popover-tree-select/components/index.vue
  2. 1 1
      src/views/purchase/PurchaseDemandList/add.vue
  3. 1 1
      src/views/purchase/apply/add/index.vue
  4. 42 0
      src/views/purchase/apply/delete/index.vue
  5. 61 96
      src/views/purchase/apply/index.vue
  6. 2 2
      src/views/purchase/apply/see/index.vue
  7. 1 1
      src/views/purchase/catalogue/edit/index.vue
  8. 32 64
      src/views/purchase/catalogue/index.vue
  9. 1 1
      src/views/purchase/contract/add/index.vue
  10. 2 3
      src/views/purchase/contract/index.vue
  11. 4 4
      src/views/purchase/contract/see/index.vue
  12. 1 1
      src/views/purchase/purchase-content/index.vue
  13. 62 28
      src/views/purchase/purchase-order/add/column.js
  14. 9 1
      src/views/purchase/purchase-order/add/index.vue
  15. 1 1
      src/views/purchase/purchase-order/column.js
  16. 15 5
      src/views/purchase/purchase-order/components/FileUploadCenter/index.vue
  17. 26 7
      src/views/purchase/purchase-order/index.vue
  18. 42 0
      src/views/purchase/task/close/index.vue
  19. 59 59
      src/views/purchase/task/column.js
  20. 1 1
      src/views/purchase/task/documents-return/index.vue
  21. 35 0
      src/views/purchase/task/export/index.vue
  22. 3 3
      src/views/purchase/task/first-direct/index.vue
  23. 97 133
      src/views/purchase/task/index.vue
  24. 1 1
      src/views/purchase/task/modify-buyer/index.vue
  25. 2 2
      src/views/purchase/task/see/index.vue
  26. 13 1
      src/views/purchase/transferOrder/index.vue

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

@@ -48,14 +48,14 @@ export default {
       try {
         this.loading = true;
         const { type, queryParams } = this.$props;
-        const { code, msg, rows } = await REFER({
+        const { code,rows } = await REFER({
           type: type,
           ...prop,
           ...queryParams,
         });
         if (code === 200) {
           this.data = rows;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

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

@@ -789,7 +789,7 @@ export default {
           let params = {...{id: row.id}, ...{pageNum:1, pageSize: 10}}
           getDemandSonDetail(params).then(res => {
             if (res.code === 200) {
-              reciveForm.puDemandItemList = res.rows
+              reciveForm.puDemandItemList = res.data
               console.log('reciveForm',reciveForm)
               this.basicForm = reciveForm
               if(this.basicForm.org) { this.reBackRefer('ORG_PARAM', this.basicForm.org) }

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

@@ -53,7 +53,7 @@ export default {
             if (code === 200) {
               this.hide();
               this.$emit("success");
-              this.$notify.success({ title: msg });
+              
             } else {
               this.$notify.warning({ title: msg });
             }

+ 42 - 0
src/views/purchase/apply/delete/index.vue

@@ -0,0 +1,42 @@
+<script>
+import { REMOVE } from "@/api/business/purchase/apply";
+export default {
+  name: "DeleteDialog",
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    //
+    open(prop) {
+      this.$confirm("是否删除数据项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+      })
+        .then(async () => {
+          try {
+            this.loading = true;
+            const { id } = prop;
+            const { code } = await REMOVE(id);
+            if (code === 200) {
+              this.$emit("success");
+            }
+          } catch (err) {
+            // catch
+          } finally {
+            // finally
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template></template>

+ 61 - 96
src/views/purchase/apply/index.vue

@@ -1,19 +1,14 @@
 <script>
 import { TableColumns, SearchColumns } from "./column";
-import { LIST, REMOVE } from "@/api/business/purchase/apply";
-import {
-  initPage,
-  initDicts,
-  initLayout,
-  initPageSizes,
-  initParams,
-} from "@/utils/init";
+import { LIST } from "@/api/business/purchase/apply";
+import { initPage, initDicts, initParams } from "@/utils/init";
 export default {
   name: "PuchaseApply",
   dicts: [...initDicts(SearchColumns), ...initDicts(TableColumns)],
   components: {
-    AddDialog: () => import("./add/index.vue"),
-    SeeDialog: () => import("./see/index.vue"),
+    AddModel: () => import("./add/index.vue"),
+    SeeModel: () => import("./see/index.vue"),
+    DeleteModel: () => import("./delete/index.vue"),
   },
   data() {
     return {
@@ -23,14 +18,12 @@ export default {
       params: initParams(SearchColumns),
       tableData: [],
       tableColumns: TableColumns,
-      page: initPage(),
-      layout: initLayout(),
-      pageSizes: initPageSizes(),
+      page: { pageNum: 1, pageSize: 10, total: 0 },
     };
   },
   computed: {},
   created() {
-    this.queryList(this.params, this.page);
+    this.useQuery(this.params, this.page);
   },
   methods: {
     //
@@ -38,7 +31,7 @@ export default {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await LIST({
+        const { code, rows, total } = await LIST({
           pageNum,
           pageSize,
           ...prop,
@@ -46,71 +39,46 @@ export default {
         if (code === 200) {
           this.tableData = rows;
           this.page.total = total;
-          this.$notify.success({ title: msg });
-        } else {
-          this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        //
+        // catch
       } finally {
+        // finally
         this.loading = false;
       }
     },
-    // 查询操作
-    queryList(prop, page) {
+    // 查 
+    useQuery(prop, page) {
       this.fetchList(prop, page);
     },
-    // 重置操作
-    resetList() {
+    // 重 
+    useReset() {
       this.page = initPage();
       this.params = initParams(SearchColumns);
-      this.queryList(this.params, this.page);
+      this.useQuery(this.params, this.page);
     },
-    // 删除操作
-    async deleteItem(prop) {
-      try {
-        this.loading = true;
-        const { id } = prop;
-        const { code, msg } = await REMOVE(id);
-        if (code === 200) {
-          this.$notify.success({ title: msg });
-          this.queryList(this.params, this.page);
-        } else {
-          this.$notify.warning({ title: msg });
-        }
-      } catch (err) {
-        //
-      } finally {
-        this.loading = false;
-      }
-    },
-    // 页大小变
-    sizeChange(prop) {
-      this.page.pageSize = prop;
-      this.queryList(this.params, this.page);
-    },
-    // 当前页变
-    currentChange(prop) {
-      this.page.pageNum = prop;
-      this.queryList(this.params, this.page);
-    },
-    // 打开新增dialog
-    async openAddDialog(prop) {
-      const { open } = this.$refs.AddDialog;
-      await open(prop);
+    // 删 除
+    async useDelete(prop) {
+      const { id } = prop;
+      const { open } = this.$refs.DeleteModel;
+      await open(id);
     },
-    // 打开查看dialog
-    async openSeeDialog(prop) {
+    // 删 除
+    async useDelete(prop) {
       const { id } = prop;
-      const { open } = this.$refs.SeeDialog;
+      const { open } = this.$refs.DeleteModel;
       await open(id);
     },
-    // 打开编辑dialog
-    async openEditDialog(prop) {
+    // 新 增
+    async useAdd() {
+      const { open } = this.$refs.AddModel;
+      await open();
+    },
+    // 明 细
+    async useSee(prop) {
       const { id } = prop;
-      const { setVisible, fetchItem } = this.$refs.EditdialogFef;
-      await setVisible(true);
-      await fetchItem(id);
+      const { open } = this.$refs.SeeModel;
+      await open(id);
     },
   },
 };
@@ -119,11 +87,20 @@ export default {
 <template>
   <el-card
     v-loading="loading"
-    style="width: calc(100% - 24px); height: 100%; margin: 10px"
+    style="
+      width: calc(100% - 20px);
+      height: 100%;
+      margin: 10px;
+      padding: 0 20px 20px 0;
+    "
     :body-style="{ padding: 0 }"
   >
-    <see-dialog ref="SeeDialog"></see-dialog>
-    <add-dialog ref="AddDialog" @success="resetList"></add-dialog>
+    <see-model ref="SeeModel"></see-model>
+    <add-model ref="AddModel" @success="useReset"></add-model>
+    <delete-model
+      ref="DeleteModel"
+      @success="useQuery(params, page)"
+    ></delete-model>
     <el-form
       :size="size"
       :model="params"
@@ -143,6 +120,7 @@ export default {
               v-model="params[column.key]"
               :placeholder="column.placeholder"
               style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
             ></el-input>
             <el-select
               v-if="column.inputType === 'Select'"
@@ -151,6 +129,7 @@ export default {
               :clearable="column.clearable"
               :placeholder="column.placeholder"
               style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
             >
               <el-option
                 v-for="item in dict.type[column.referName]"
@@ -172,32 +151,23 @@ export default {
               :value-key="column.valueKey"
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
+              @keyup.enter.native="useQuery(params, page)"
             >
             </dr-popover-select>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label-width="0">
-            <el-button
-              circle
-              :size="size"
-              icon="el-icon-search"
-              @click="queryList(params, page)"
-            ></el-button>
-            <el-button
-              circle
-              :size="size"
-              icon="el-icon-refresh"
-              @click="resetList"
-            ></el-button>
-          </el-form-item>
-        </el-col>
       </el-row>
     </el-form>
+    <el-row style="padding: 0 20px">
+      <el-button :size="size" @click="useQuery(params, page)">
+        查 询
+      </el-button>
+      <el-button :size="size" @click="useReset"> 重 置 </el-button>
+    </el-row>
     <el-table
       :size="size"
       :data="tableData"
-      @row-dblclick="openSeeDialog"
+      @row-dblclick="openSeeModel"
       style="width: 100%; margin: 20px 0 0 0"
     >
       <el-table-column
@@ -212,7 +182,7 @@ export default {
       <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button
-            @click.native.prevent="openAddDialog(scope.row)"
+            @click.native.prevent="useAdd(scope.row)"
             type="text"
             size="small"
           >
@@ -226,7 +196,7 @@ export default {
             编 辑
           </el-button> -->
           <el-button
-            @click.native.prevent="deleteItem(scope.row)"
+            @click.native.prevent="useDelete(scope.row)"
             type="text"
             size="small"
           >
@@ -235,16 +205,11 @@ export default {
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination
-      @size-change="sizeChange"
-      @current-change="currentChange"
+    <pagination
       :total="page.total"
-      :page-sizes="pageSizes"
-      :page-size="page.pageSize"
-      :current-page="page.pageNum"
-      :layout="layout"
-      style="margin: 16px 0"
-    >
-    </el-pagination>
+      :page.sync="page.pageNum"
+      :limit.sync="page.pageSize"
+      @pagination="useQuery(params, page)"
+    />
   </el-card>
 </template>

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

@@ -32,10 +32,10 @@ export default {
     async fetchItem(prop) {
       try {
         this.loading = true;
-        const { code, msg, data } = await ITEM(prop);
+        const { code,data } = await ITEM(prop);
         if (code === 200) {
           this.params = data;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

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

@@ -52,7 +52,7 @@ export default {
             if (code === 200) {
               this.hide();
               this.$emit("success");
-              this.$notify.success({ title: msg });
+              
             } else {
               this.$notify.warning({ title: msg });
             }

+ 32 - 64
src/views/purchase/catalogue/index.vue

@@ -1,13 +1,11 @@
 <script>
 import { TableColumns, SearchColumns } from "./column";
 import { LIST } from "@/api/business/purchase/catalogue";
-import { initPage, initLayout, initPageSizes, initParams } from "@/utils/init";
+import { initPage, initParams } from "@/utils/init";
 export default {
   name: "PuchaseCatalogue",
   components: {
-    // AddDrawer: () => import("./add/index.vue"),
-    // SeeDrawer: () => import("./see/index.vue"),
-    EditDialog: () => import("./edit/index.vue"),
+    EditModel: () => import("./edit/index.vue"),
   },
   data() {
     return {
@@ -17,14 +15,12 @@ export default {
       params: initParams(SearchColumns),
       tableData: [],
       tableColumns: TableColumns,
-      page: initPage(),
-      layout: initLayout(),
-      pageSizes: initPageSizes(),
+      page: { pageNum: 1, pageSize: 10, total: 0 },
     };
   },
   computed: {},
   created() {
-    this.queryList(this.params, this.page);
+    this.useQuery(this.params, this.page);
   },
   methods: {
     //
@@ -32,7 +28,7 @@ export default {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await LIST({
+        const { code, rows, total } = await LIST({
           pageNum,
           pageSize,
           ...prop,
@@ -40,40 +36,28 @@ export default {
         if (code === 200) {
           this.tableData = rows;
           this.page.total = total;
-          this.$notify.success({ title: msg });
-        } else {
-          this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        //
+        // catch
       } finally {
+        // finally
         this.loading = false;
       }
     },
-    // 查询操作
-    queryList() {
-      this.fetchList(this.params, this.page);
+    // 查 
+    useQuery(prop, page) {
+      this.fetchList(prop, page);
     },
-    // 重置操作
-    resetList() {
+    // 重 
+    useReset() {
       this.page = initPage();
       this.params = initParams(SearchColumns);
-      this.fetchList(this.params, this.page);
+      this.useQuery(this.params, this.page);
     },
-    // 页大小变
-    sizeChange(prop) {
-      this.page.pageSize = prop;
-      this.fetchList(this.params, this.page);
-    },
-    // 当前页变
-    currentChange(prop) {
-      this.page.pageNum = prop;
-      this.fetchList(this.params, this.page);
-    },
-    // 打开编辑dialog
-    async openEditDialog(prop) {
+    // 编 辑
+    async useEdit(prop) {
       return;
-      const { open } = this.$refs.Editdialog;
+      const { open } = this.$refs.EditModel;
       await open(prop);
     },
   },
@@ -88,7 +72,7 @@ export default {
   >
     <!-- <see-drawer ref="SeeDrawerFef"></see-drawer> -->
     <!-- <add-drawer ref="AddDrawerFef" @close="resetList"></add-drawer> -->
-    <edit-dialog ref="Editdialog" @success="resetList"></edit-dialog>
+    <!-- <edit-model ref="EditModel" @success="resetList"></edit-model> -->
     <el-form
       :size="size"
       :model="params"
@@ -110,12 +94,14 @@ export default {
                   v-model="params[column.key]"
                   :placeholder="column.placeholder"
                   style="width: 100%"
+                  @keyup.enter.native="useQuery(params, page)"
                 ></el-input>
                 <el-switch
                   v-if="column.inputType === 'Switch'"
                   v-model="params[column.key]"
                   active-value="1"
                   inactive-value="0"
+                  @keyup.enter.native="useQuery(params, page)"
                 >
                 </el-switch>
                 <dr-popover-select
@@ -130,36 +116,23 @@ export default {
                   :value-key="column.valueKey"
                   :placeholder="column.placeholder"
                   :data-mapping="column.dataMapping"
+                  @keyup.enter.native="useQuery(params, page)"
                 >
                 </dr-popover-select>
               </el-form-item>
             </el-col>
           </el-row>
         </el-col>
-        <el-col :span="1" :offset="1">
-          <el-row style="display: flex; flex-wrap: wrap">
-            <el-col :span="24" style="margin-bottom: 20px">
-              <el-button
-                circle
-                :size="size"
-                icon="el-icon-search"
-                @click="queryList(params, page)"
-              ></el-button>
-            </el-col>
-            <el-col :span="24">
-              <el-button
-                circle
-                :size="size"
-                icon="el-icon-refresh"
-                @click="resetList"
-              ></el-button>
-            </el-col>
-          </el-row>
-        </el-col>
       </el-row>
     </el-form>
+    <el-row style="padding: 0 20px">
+      <el-button :size="size" @click="useQuery(params, page)">
+        查 询
+      </el-button>
+      <el-button :size="size" @click="useReset"> 重 置 </el-button>
+    </el-row>
     <el-table
-      @row-dblclick="openEditDialog"
+      @row-dblclick="useEdit"
       :data="tableData"
       :size="size"
       style="width: 100%; margin: 20px 0 0 0"
@@ -174,16 +147,11 @@ export default {
       >
       </el-table-column>
     </el-table>
-    <el-pagination
-      @size-change="sizeChange"
-      @current-change="currentChange"
+    <pagination
       :total="page.total"
-      :page-sizes="pageSizes"
-      :page-size="page.pageSize"
-      :current-page="page.pageNum"
-      :layout="layout"
-      style="margin: 16px 0"
-    >
-    </el-pagination>
+      :page.sync="page.pageNum"
+      :limit.sync="page.pageSize"
+      @pagination="useQuery(params, page)"
+    />
   </el-card>
 </template>

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

@@ -132,7 +132,7 @@ export default {
             if (code === 200) {
               this.hide();
               this.$emit("success");
-              this.$notify.success({ title: msg });
+              
             } else {
               this.$notify.warning({ title: msg });
             }

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

@@ -34,7 +34,7 @@ export default {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await LIST({
+        const { code, rows, total } = await LIST({
           pageNum,
           pageSize,
           ...prop,
@@ -42,7 +42,6 @@ export default {
         if (code === 200) {
           this.tableData = rows;
           this.page.total = total;
-          this.$notify.success({ title: msg });
         }
       } catch (err) {
         // catch
@@ -137,7 +136,7 @@ export default {
             <el-input
               v-model="params[column.key]"
               :placeholder="column.placeholder"
-              @change="useQuery(params, page)"
+              @keyup.enter.native="useQuery(params, page)"
             ></el-input>
           </el-form-item>
         </el-col>

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

@@ -49,10 +49,10 @@ export default {
     async fetchItem(prop) {
       try {
         this.loading = true;
-        const { code, msg, data } = await ITEM(prop);
+        const { code,data } = await ITEM(prop);
         if (code === 200) {
           this.params = data;
-          this.$notify.success({ title: msg });
+          
           this.tabName = this.tabColumns[0].key;
           this.fetchTable(this.params.code, this.tabName);
         } else {
@@ -68,10 +68,10 @@ export default {
     async fetchTable(prop, name) {
       try {
         this.loading = true;
-        const { code, msg, rows } = await TABLELIST({ contractId: prop }, name);
+        const { code,rows } = await TABLELIST({ contractId: prop }, name);
         if (code === 200) {
           this.params[name] = rows;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

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

@@ -191,7 +191,7 @@ export default {
         if (code === 200) {
           this.total = total;
           this.tableData = rows;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

+ 62 - 28
src/views/purchase/purchase-order/add/column.js

@@ -408,41 +408,55 @@ export const TabColumns = [
         title: "物料编码",
         inputType: "Input",
         width: 180,
+        disabled:true,
+        readonly:true,
       },
       { //classifyIdName   classifyId
         key: "materialClassify",
         title: "物料分类", 
         inputType: "Input",
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true, 
       },
       { // manufacturersMaterialCode  manufacturersMaterialName
         key: "materialManufacturersCode",
          title: "厂家物料编码", 
          inputType: "Input",
-          width: 180
+          width: 180,
+          disabled:true,
+        readonly:true,
          },
       { //specification
         key: "specification",
-         title: "规格", 
-         inputType: "Input",
-          width: 180 
+        title: "规格", 
+        inputType: "Input",
+        width: 180 ,
+        disabled:true,
+        readonly:true,
         },
       { //model
         key: "model",
-         title: "型号", 
-         inputType: "Input",
-         },
+        title: "型号", 
+        inputType: "Input",
+        disabled:true,
+        readonly:true,
+      },
       { //isMedicine  isMedicineValue
         key: "isMedcine",
-         title: "医药物料", 
-         inputType: "Input", 
-         width: 180 
+        title: "医药物料", 
+        inputType: "Input", 
+        width: 180,
+        disabled:true,
+        readonly:true,
         },
       { // manufacturerId  manufacturerIdName
         key: "manufacturer",
         title: "生产厂家代理人",
         inputType: "Input",
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { 
         key: "isDrug",
@@ -454,6 +468,8 @@ export const TabColumns = [
         key: "unit", 
         title: "单位", 
         inputType: "Input",
+        disabled:true,
+        readonly:true,
        },
       {
         key: "qty",
@@ -467,8 +483,8 @@ export const TabColumns = [
       { //materialRate  materialRateName
         key: "tax", 
         title: "税率",
-         inputType: "Input",
-         },
+        inputType: "Input",
+      },
       { key: "taxDeductMoneya", title: "折扣金额", inputType: "Input", },
       { key: "arrivalQty", title: "已到货数量", inputType: "Input", },
       { key: "unarrivedQty", title: "未到货数量", inputType: "Input", },
@@ -520,14 +536,18 @@ export const TabColumns = [
         title: "存储条件",
         inputType: "Select",
         referName: "sys_storage_condition", // 字典名
-        width: 180
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { // transportationCondition  transportationConditionName
         key: "carriageCondition",
         title: "运输条件",
         inputType: "Select",
         referName: "sys_conditions_carriage", // 字典名
-        width: 180
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
 
       { key: "isBatchLock", title: "批号锁定标识", inputType: "Checkbox", },
@@ -559,26 +579,34 @@ export const TabColumns = [
         key: "materialClassifyOneName", 
         title: "物料一级分类名称", 
         inputType: "Input",
-         width: 180 
-        },
+        width: 180,
+        disabled:true,
+        readonly:true, 
+      },
       { //twoClass
         key: "materialClassifyTwoName",
-         title: "物料二级分类名称", 
-         inputType: "Input",
-          width: 180
-         },
+        title: "物料二级分类名称", 
+        inputType: "Input",
+        width: 180,
+        disabled:true,
+        readonly:true, 
+      },
       { //threeClass
         key: "materialClassifyThreeName", 
         title: "物料三级分类名称", 
         inputType: "Input", 
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { //fourClass
         key: "materialClassifyFourName", 
         title: "物料四级分类名称",
-         inputType: "Input", 
-         width: 180 
-        },
+        inputType: "Input", 
+        width: 180,
+        disabled:true,
+        readonly:true,
+      },
       { 
         key: "price",
         title: "无税单价",
@@ -590,7 +618,7 @@ export const TabColumns = [
     title: '执行结果',
     key: 'puOrderExecuteList',
     tableColumns: [
-      { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
+      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
       { key: "rowno", title: "行号", inputType: "Input", },
       {
         key: "materialName",
@@ -620,7 +648,13 @@ export const TabColumns = [
         queryParams: () => ({}),
         width: 180
       },
-      { key: "specification", title: "规格", inputType: "Input", },
+      { 
+        key: "specification",
+        title: "规格", 
+        inputType: "Input", 
+        disabled:true,
+        readonly:true, 
+      },
       {
         key: "qty",
         title: "数量",

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

@@ -199,7 +199,7 @@ export default {
     // 保存
     async handleSava() {
       // orderAddForm
-      console.log(this.params.sysFileRecordList, "params");
+      console.log(this.params, "params");
 
       // this.$refs['orderAddForm'].validate(async (valid) => {
       //   if (valid) {
@@ -285,6 +285,13 @@ export default {
       }
     },
 
+    // 下卡框选择改变
+    handleChangeSelect(val,typeName){
+      if(val === 'billType'){
+       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+      }
+    },
+
   },
   created() {
     console.log("ADD CREATED", this.params)
@@ -376,6 +383,7 @@ export default {
                 :clearable="column.clearable" 
                 :placeholder="column.placeholder" 
                 style="width: 100%"
+                @change="handleChangeSelect(column.key,column.referName)"
                 >
                 <el-option 
                   v-for="item in dict.type[column.referName]" 

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

@@ -21,7 +21,7 @@ export const TableColumns = [
     title: "单据状态",
     inputType: "Select",
     width:80,
-    referName: "sys_status", // 字典名
+    referName: "documents_status", // 字典名
   },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },

+ 15 - 5
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -23,9 +23,11 @@
 
       <li :key="file.fileUrl" class="el-upload-list__item ele-upload-list__item-content"
         v-for="(file, index) in fileList">
-        <!-- <el-link :href="`${baseUrl}${file.fileUrl}`" :underline="false" target="_blank"> -->
-        <el-link :href="`${baseUrl}${file.fileUrl}`" :underline="false" target="_blank">
-          <!-- <span class="el-icon-document"> {{ getFileName(file.name) }} </span> -->
+        <el-link
+          :href="`${baseUrl}?id=${file.fileFastId}`"
+          :underline="false"
+          target="_blank"
+        >
           <span class="el-icon-document"> {{ file.fileName }} </span>
         </el-link>
         <div class="ele-upload-list__item-content-action">
@@ -75,8 +77,16 @@ export default {
     return {
       number: 0,
       uploadList: [],
-      baseUrl: '/sy-derom',
-      uploadFileUrl: "/sy-derom/document-center/fastdfs/upload", // 上传文件服务器地址
+      // baseUrl: '/sy-derom',
+      // uploadFileUrl: "/sy-derom/document-center/fastdfs/upload", // 上传文件服务器地址
+      baseUrl: "https://sy.derom.com/document-center/fastdfs/download",
+      uploadFileUrl:
+        process.env.NODE_ENV == "development"
+          ? "/drp-file/document-center/fastdfs/upload"
+          : "/document-center/fastdfs/upload",
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
       fileList: [],
     };
   },

+ 26 - 7
src/views/purchase/purchase-order/index.vue

@@ -146,15 +146,34 @@ export default {
       }
     },
     // 删除操作
-    async handleDeleteList(row) {
+     handleDeleteList(row) {
       try {
         this.loading = true;
-        const { id } = row;
-        console.log(id, 'id');
-        const { code, msg } = await orderApi.remove(id);
-        if (code === 200) {
-          this.fetchList(this.params, this.page);
-        }
+
+        this.$confirm('此操作将删除该订单, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then( async() => {
+
+          const { id } = row;
+
+          const { code } = await orderApi.remove(id);
+          
+          if (code === 200) {
+
+            this.fetchList(this.params, this.page);
+
+          }
+
+        }).catch(() => {
+
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+        
       } catch (err) {
         //
       } finally {

+ 42 - 0
src/views/purchase/task/close/index.vue

@@ -0,0 +1,42 @@
+<script>
+import { SHUTDOWN } from "@/api/business/purchase/task";
+export default {
+  name: "DeleteDialog",
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    //
+    open(prop) {
+      this.$confirm("是否关闭数据项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+      })
+        .then(async () => {
+          try {
+            this.loading = true;
+            const { demandItemId } = prop;
+            const { code } = await SHUTDOWN(demandItemId);
+            if (code === 200) {
+              this.$emit("success");
+            }
+          } catch (err) {
+            // catch
+          } finally {
+            // finally
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template></template>

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

@@ -67,65 +67,6 @@ export const TableColumns = [
   // { key: "delFlag", title: "删除标记" },
 ];
 
-const pickerOptions = {
-  shortcuts: [
-    {
-      text: "昨天",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-    {
-      text: "最近三天",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-    {
-      text: "最近一周",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-    {
-      text: "最近一个月",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-    {
-      text: "最近三个月",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-    {
-      text: "最近半年",
-      onClick(picker) {
-        const end = new Date();
-        const start = new Date();
-        start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
-        picker.$emit("pick", [start, end]);
-      },
-    },
-  ],
-};
-
 export const SearchColumns = [
   {
     key: "classIds",
@@ -199,3 +140,62 @@ export const SearchColumns = [
     placeholder: "请输入来源单据号,多个用,分隔",
   },
 ];
+
+const pickerOptions = {
+  shortcuts: [
+    {
+      text: "昨天",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+    {
+      text: "最近三天",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+    {
+      text: "最近一周",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+    {
+      text: "最近一个月",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+    {
+      text: "最近三个月",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+    {
+      text: "最近半年",
+      onClick(picker) {
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
+        picker.$emit("pick", [start, end]);
+      },
+    },
+  ],
+};

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

@@ -38,7 +38,7 @@ export default {
         if (code === 200) {
           this.hide();
           this.$emit("success");
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

+ 35 - 0
src/views/purchase/task/export/index.vue

@@ -0,0 +1,35 @@
+<script>
+export default {
+  name: "ExportDialog",
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    //
+    open(prop, page) {
+      this.$confirm("是否确认导出所有数据项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+      })
+        .then(() => {
+          const { pageNum, pageSize } = page;
+          this.download(
+            "pu/order/generate/export",
+            { ...prop, pageNum, pageSize },
+            `task_${new Date().getTime()}.xlsx`
+          );
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template></template>

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

@@ -30,10 +30,10 @@ export default {
     async fetchItem(prop) {
       try {
         this.loading = true;
-        const { code, msg, data } = await FIRSTDIRECT(prop);
+        const { code,data } = await FIRSTDIRECT(prop);
         if (code === 200) {
           this.data = data;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.hide();
           this.$notify.warning({ title: msg });
@@ -59,7 +59,7 @@ export default {
         if (code === 200) {
           this.hide();
           this.$emit("success");
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

+ 97 - 133
src/views/purchase/task/index.vue

@@ -1,22 +1,18 @@
 el-col
 <script>
 import { TableColumns, SearchColumns } from "./column";
-import { LIST, SHUTDOWN } from "@/api/business/purchase/task";
-import {
-  initPage,
-  initDicts,
-  initLayout,
-  initParams,
-  initPageSizes,
-} from "@/utils/init";
+import { LIST } from "@/api/business/purchase/task";
+import { initPage, initDicts, initParams } from "@/utils/init";
 export default {
   name: "PuchaseTask",
   dicts: [...initDicts(TableColumns), ...initDicts(SearchColumns)],
   components: {
-    SeeDialog: () => import("./see/index.vue"),
-    FirstDirectDialog: () => import("./first-direct/index.vue"),
-    DocReturnDialog: () => import("./documents-return/index.vue"),
-    ModifyBuyerDialog: () => import("./modify-buyer/index.vue"),
+    SeeModel: () => import("./see/index.vue"),
+    CloseModel: () => import("./close/index.vue"),
+    ExportModel: () => import("./export/index.vue"),
+    ShiftModel: () => import("./modify-buyer/index.vue"),
+    DirectModel: () => import("./first-direct/index.vue"),
+    ReturnModel: () => import("./documents-return/index.vue"),
   },
   data() {
     return {
@@ -33,7 +29,7 @@ export default {
   computed: {},
   watch: {},
   created() {
-    this.queryList(this.params, this.page);
+    this.useQuery(this.params, this.page);
   },
   methods: {
     //
@@ -41,98 +37,83 @@ export default {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await LIST(
+        const { code,rows, total } = await LIST(
           { ...prop },
-          { pageNum, pageSize, isAsc: "desc", orderByColumn: "createTime" }
+          { pageNum, pageSize }
         );
         if (code === 200) {
           this.tableData = rows;
           this.page.total = total;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        //
+        // catch
       } finally {
+        // finally
         this.loading = false;
       }
     },
-    // 查询操作
-    queryList(prop, page) {
-      const { date } = prop;
+    // 查 
+    useQuery(prop, page) {
+      const { date, documentsCodes } = prop;
       prop.endDate = date[1];
       prop.startDate = date[0];
-      this.fetchList({ ...prop, date: undefined }, page);
+      prop.documentsCodes = documentsCodes
+        ? documentsCodes.split(",")
+        : undefined;
+      this.fetchList(
+        {
+          ...prop,
+          isAsc: "desc",
+          date: undefined,
+          orderByColumn: "createTime",
+        },
+        page
+      );
     },
-    // 重置操作
-    resetList() {
+    // 重 
+    useReset() {
       this.page = initPage();
       this.params = initParams(SearchColumns);
-      this.queryList(this.params, this.page);
-    },
-    // 页大小变
-    sizeChange(prop) {
-      this.page.pageSize = prop;
-      this.queryList(this.params, this.page);
+      this.useQuery(this.params, this.page);
     },
-    // 当前页变
-    currentChange(prop) {
-      this.page.pageNum = prop;
-      this.queryList(this.params, this.page);
-    },
-    // 选择行
-    selectionChange(prop) {
+    // 选 择
+    useSelect(prop) {
       this.selectData = prop;
     },
-    // 行关闭
-    async shutDown(prop) {
-      try {
-        this.loading = true;
-        const { demandItemId } = prop;
-        const { code, msg } = await SHUTDOWN(demandItemId);
-        if (code === 200) {
-          this.$notify.success({ title: msg });
-          await this.queryList(this.params, this.page);
-        } else {
-          this.$notify.warning({ title: msg });
-        }
-      } catch (err) {
-        //
-      } finally {
-        this.loading = false;
-      }
+    // 行 关
+    async useClose(prop) {
+      const { open } = this.$refs.CloseModel;
+      await open(prop);
     },
-    // 退回需求
-    async openDocumentsReturnDialog(prop) {
-      const { open } = this.$refs.DocReturnDialog;
+    // 退 回
+    async useReturn(prop) {
+      const { open } = this.$refs.ReturnModel;
       await open(prop);
     },
-    // 转派
-    async openModifyBuyerDialog(prop) {
+    // 转 派
+    async useShift(prop) {
       const { id } = prop;
-      const { open } = this.$refs.ModifyBuyerDialog;
+      const { open } = this.$refs.ShiftModTel;
       await open(id);
     },
-    // 打开查看drawer
-    async openSeeDialog(prop) {
+    // 明 细
+    async useSee(prop) {
       const { id } = prop;
-      const { open } = this.$refs.SeeDialog;
+      const { open } = this.$refs.SeeModel;
       await open(id);
     },
-    // 打开首次直采drawer
-    async openFristDirectDialog(prop) {
-      const { open } = this.$refs.FirstDirectDialog;
+    // 直 
+    async useDirect(prop) {
+      const { open } = this.$refs.DirectModel;
       await open(prop);
     },
-    // 导出
+    // 导 
     async useExport(prop, page) {
-      const { pageNum, pageSize } = page;
-      this.download(
-        "pu/order/generate/export",
-        { ...prop, pageNum, pageSize },
-        `KONG_${new Date().getTime()}.xlsx`
-      );
+      const { open } = this.$refs.ExportModel;
+      await open(prop, page);
     },
   },
 };
@@ -149,19 +130,12 @@ export default {
     "
     :body-style="{ padding: 0 }"
   >
-    <see-dialog ref="SeeDialog"></see-dialog>
-    <first-direct-dialog
-      ref="FirstDirectDialog"
-      @success="resetList"
-    ></first-direct-dialog>
-    <doc-return-dialog
-      ref="DocReturnDialog"
-      @success="resetList"
-    ></doc-return-dialog>
-    <modify-buyer-dialog
-      ref="ModifyBuyerDialog"
-      @success="resetList"
-    ></modify-buyer-dialog>
+    <see-model ref="SeeModel"></see-model>
+    <export-model ref="ExportModel"></export-model>
+    <close-model ref="CloseModel" @success="useReset"></close-model>
+    <shift-model ref="ShiftModel" @success="useReset"></shift-model>
+    <direct-model ref="DirectModel" @success="useReset"></direct-model>
+    <return-model ref="ReturnModel" @success="useReset"></return-model>
     <el-backtop target=".el-scrollbar__wrap"></el-backtop>
     <el-form
       :size="size"
@@ -185,6 +159,7 @@ export default {
               :clearable="column.clearable"
               :placeholder="column.placeholder"
               style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
             ></el-input>
             <el-select
               v-if="column.inputType === 'Select'"
@@ -193,6 +168,7 @@ export default {
               :clearable="column.clearable"
               :placeholder="column.placeholder"
               style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
             >
               <el-option
                 v-for="item in dict.type[column.referName]"
@@ -214,6 +190,7 @@ export default {
               :end-placeholder="column.endPlaceholder"
               :start-placeholder="column.startPlaceholder"
               style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
             >
             </el-date-picker>
             <dr-popover-select
@@ -229,6 +206,7 @@ export default {
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
               :query-params="column.queryParams(params)"
+              @keyup.enter.native="useQuery(params, page)"
             >
             </dr-popover-select>
             <dr-popover-tree-select
@@ -247,65 +225,51 @@ export default {
             </dr-popover-tree-select>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label-width="0">
-            <el-button
-              circle
-              :size="size"
-              icon="el-icon-search"
-              @click="queryList(params, page)"
-            ></el-button>
-            <el-button
-              circle
-              :size="size"
-              icon="el-icon-refresh"
-              @click="resetList"
-            ></el-button>
-          </el-form-item>
-        </el-col>
       </el-row>
     </el-form>
-    <el-row :gutter="24" style="padding: 0 20px">
-      <el-col :span="24">
-        <el-button :size="size" @click="useExport(params, page)">
-          导 出
-        </el-button>
-        <el-button
-          :size="size"
-          :disabled="selectData.length !== 1"
-          @click="openModifyBuyerDialog(selectData[0])"
-        >
-          转 派
-        </el-button>
-        <el-button
-          :size="size"
-          :disabled="!selectData.length"
-          @click="openDocumentsReturnDialog(selectData)"
-        >
-          退回需求
-        </el-button>
-        <!-- <el-button
+    <el-row style="padding: 0 20px">
+      <el-button :size="size" @click="useQuery(params, page)">
+        查 询
+      </el-button>
+      <el-button :size="size" @click="useReset"> 重 置 </el-button>
+      <!-- <el-button :size="size" @click="useExport(params, page)">
+        导 出
+      </el-button> -->
+      <el-button
+        :size="size"
+        :disabled="selectData.length !== 1"
+        @click="useShift(selectData[0])"
+      >
+        转 派
+      </el-button>
+      <el-button
+        :size="size"
+        :disabled="!selectData.length"
+        @click="useReturn(selectData)"
+      >
+        退回需求
+      </el-button>
+      <!-- <el-button
           :size="size"
           :disabled="selectData.length !== 1"
-          @click="shutDown(selectData[0])"
+          @click="useClose(selectData[0])"
         >
           行关闭
         </el-button> -->
-        <el-button
-          :size="size"
-          :disabled="!selectData.length"
-          @click="openFristDirectDialog(selectData)"
-        >
-          协议直采
-        </el-button>
-      </el-col>
+      <el-button
+        :size="size"
+        :disabled="!selectData.length"
+        @click="useDirect(selectData)"
+      >
+        协议直采
+      </el-button>
     </el-row>
     <el-table
       :data="tableData"
       size="mini"
       style="width: 100%; margin: 20px 0 0 0"
-      @row-dblclick="openSeeDialog"
-      @selection-change="selectionChange"
+      @row-dblclick="useSee"
+      @selection-change="useSelect"
     >
       <el-table-column fixed width="55" align="center" type="selection">
       </el-table-column>
@@ -332,7 +296,7 @@ export default {
       :total="page.total"
       :page.sync="page.pageNum"
       :limit.sync="page.pageSize"
-      @pagination="queryList(params, page)"
+      @pagination="useQuery(params, page)"
     />
   </el-card>
 </template>

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

@@ -41,7 +41,7 @@ export default {
         if (code === 200) {
           this.hide();
           this.$emit("success");
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

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

@@ -32,10 +32,10 @@ export default {
     async fetchItem(prop) {
       try {
         this.loading = true;
-        const { code, msg, data } = await ITEM(prop);
+        const { code,data } = await ITEM(prop);
         if (code === 200) {
           this.params = data;
-          this.$notify.success({ title: msg });
+          
         } else {
           this.$notify.warning({ title: msg });
         }

+ 13 - 1
src/views/purchase/transferOrder/index.vue

@@ -13,7 +13,7 @@
           <el-col :span="1.5">
             <el-form-item label="单据日期">
               <el-date-picker
-               style="width: 240px"
+               style="width: 200px"
                size="small"
                clearable
                value-format="yyyy-MM-dd"
@@ -38,6 +38,16 @@
             </el-form-item>
           </el-col>
           <el-col :span="1.5">
+            <el-form-item label="单据号">
+              <el-input
+                v-model.trim="queryParams.code"
+                size="small"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
             <el-form-item label="" label-width="20px">
               <el-button type="primary" size="small" icon="el-icon-search" plain @click="searchList">搜索</el-button>
               <el-button size="small" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
@@ -329,6 +339,7 @@ export default {
         billDate: '',
         billType: '',
         storageInventoryOrg: '',
+        code: '',
         pageNum: 1,
         pageSize: 5
       },
@@ -368,6 +379,7 @@ export default {
         billDate: '',
         billType: '',
         storageInventoryOrg: '',
+        code: '',
         pageNum: 1,
         pageSize: 5
       }