瀏覽代碼

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!385
黄梓星 1 年之前
父節點
當前提交
659160660c

+ 9 - 1
src/views/material/basicFile/index.vue

@@ -477,7 +477,15 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.download('/system/material/export', {...this.params}, `物料基本信息${new Date().getTime()}.xlsx`);
+          let params = {
+            templateCode:'material',
+            ...this.params,
+            createTimeBegin: (this.params.createTimeQueue && this.params.createTimeQueue[0]) || '',
+            createTimeEnd:(this.params.createTimeQueue && this.params.createTimeQueue[1]) || '',
+            updateTimeBegin:(this.params.updateTimeQueue && this.params.updateTimeQueue[0]) || '',
+            updateTimeEnd:(this.params.updateTimeQueue && this.params.updateTimeQueue[1]) || ''
+          }
+          this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         }
 
       },

+ 1 - 0
src/views/material/changeApply/add/column.js

@@ -129,6 +129,7 @@ export default function useColumns(){
             require: true,
           },
           attr:{
+            readonly:true,
             is: "el-popover-select-v2",
             valueKey: "code",
             referName: "MATERIAL_PARAM",

+ 11 - 8
src/views/material/requisition/add.vue

@@ -292,7 +292,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
-                <el-form-item label="最小起量" prop="minOrderQty">
+                <el-form-item label="最小起量" prop="minOrderQty">
                   <el-input type="number" min="0" :disabled="disable" v-model="basicForm.minOrderQty"></el-input>
                 </el-form-item>
               </el-col>
@@ -872,7 +872,7 @@
           storageCondition: [{required: true, message: '请选择存储条件', trigger: 'change'}],
           materialRate: [{required: true, message: '请选择物料税类', trigger: 'change'}],
           deliveryPeriod: [{required: true, message: '请输入交货周期', trigger: 'blur'}],
-          minOrderQty: [{required: true, message: '请输入最小起量', trigger: 'blur'}],
+          minOrderQty: [{required: true, message: '请输入最小起量', trigger: 'blur'}],
           minPackQty: [{required: true, message: '请输入最小包装量', trigger: 'blur'}],
           puPersonnelId: [{required: true, message: '请选择采购员', trigger: 'change'}],
           minBatchQty: [{required: true, message: '请输入最小批量', trigger: 'blur'}],
@@ -1362,7 +1362,7 @@
             })
           })
 
-          Promise.all([form1, form2]).then(() => {
+          // Promise.all([form1, form2]).then(() => {
             if (this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
               this.$modal.notifyWarning("医药物料需要维护物料类别!");
 
@@ -1381,7 +1381,7 @@
                 this.$modal.closeLoading();
               })
             }
-          })
+          // })
         } else {
 
           // alert('保存传status:0')
@@ -1395,6 +1395,7 @@
           sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply;
 
           console.log('保存参数', sparams)
+
           const form1 = new Promise((resolve, reject) => {
             this.$refs['basic'].validate(valid => {
               if (valid) resolve()
@@ -1405,7 +1406,8 @@
               if (valid) resolve()
             })
           })
-          Promise.all([form1, form2]).then(() => {
+
+          // Promise.all([form1, form2]).then(() => {
             if (this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
               this.$modal.notifyWarning("医药物料需要维护物料类别!");
             } else {
@@ -1423,7 +1425,7 @@
                 this.$modal.closeLoading();
               })
             }
-          })
+          // })
         }
       },
       submit() {
@@ -1445,7 +1447,8 @@
             if (valid) resolve()
           })
         })
-        Promise.all([form1, form2]).then(() => {
+
+        // Promise.all([form1, form2]).then(() => {
           // 提交时候要维护物料类别
           if (this.sysMaterialMedcineItemApply.length !== 0) {
             this.$modal.loading("提交中...");
@@ -1467,7 +1470,7 @@
               type: 'warning'
             });
           }
-        })
+        // })
       },
       back() {
         this.$emit('jugislist', true)

+ 7 - 7
src/views/material/requisition/columns.js

@@ -148,13 +148,13 @@
         },
       },
     },
-    // {
-    //   item: { key: "registrationNo", title: "注册证号" },
-    //   attr: {
-    //     clearable:true,
-    //     is: "el-input",
-    //   },
-    // },
+    {
+      item: { key: "registrationNo", title: "注册证号" },
+      attr: {
+        clearable:true,
+        is: "el-input",
+      },
+    },
     
   
   ].map(({ item, attr }) => ({

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

@@ -348,7 +348,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="[10, 20, 50, 100, 200, 500]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

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

@@ -262,7 +262,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="[10, 20, 50, 100, 200, 500]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

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

@@ -219,7 +219,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20 ,50 ,100]"
+          :page-sizes="[10, 20, 50, 100, 200, 500]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

+ 2 - 2
src/views/purchase/apply/add/columns.js

@@ -279,10 +279,10 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "价格调整" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
             is: "el-select",
-            dictName: "is_effective",
+            dictName: "price_adjustment_type",
             disabled: true,
           },
         },

+ 29 - 0
src/views/purchase/apply/add/index.vue

@@ -110,6 +110,25 @@
           });
         }
       },
+      // 
+      async changeCustomerName(prop) {
+        console.log("prop", prop)
+        const {
+          puOrg,
+          supplier,
+          currency,
+          currencyCode,
+          currencyName,
+        } = this.params;
+        const {
+          recentlyPrice,
+          isApprovalFirst,
+          purchasequantity
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          prop.row.yPurchaseQuantity = purchasequantity
+          prop.row.recentlyPrice = recentlyPrice
+          prop.row.isApprovalFirst = isApprovalFirst
+      },
       //
       async onOpen() {
         this.visible = true;
@@ -252,6 +271,16 @@
                 >
                 </component>
               </template>
+              <template slot="customerName" slot-scope="scope">
+                <component
+                  v-bind="scope.attr"
+                  v-model="scope.row[scope.item.key]"
+                  :size="$attrs.size"
+                  :source.sync="scope.row"
+                  @change="changeCustomerName({ ...scope, selectData: $event })"
+                >
+                </component>
+              </template>
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot="header" slot-scope="scope">
                   <el-button

+ 2 - 2
src/views/purchase/apply/copy/columns.js

@@ -279,10 +279,10 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "价格调整" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
             is: "el-select",
-            dictName: "is_effective",
+            dictName: "price_adjustment_type",
             disabled: true,
           },
         },

+ 29 - 0
src/views/purchase/apply/copy/index.vue

@@ -126,6 +126,25 @@ export default {
         });
       }
     },
+      // 
+      async changeCustomerName(prop) {
+        console.log("prop", prop)
+        const {
+          puOrg,
+          supplier,
+          currency,
+          currencyCode,
+          currencyName,
+        } = this.params;
+        const {
+          recentlyPrice,
+          isApprovalFirst,
+          purchasequantity
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          prop.row.yPurchaseQuantity = purchasequantity
+          prop.row.recentlyPrice = recentlyPrice
+          prop.row.isApprovalFirst = isApprovalFirst
+      },
     //
     async fetchItem(prop) {
       try {
@@ -306,6 +325,16 @@ export default {
                 >
                 </component>
               </template>
+              <template slot="customerName" slot-scope="scope">
+                <component
+                  v-bind="scope.attr"
+                  v-model="scope.row[scope.item.key]"
+                  :size="$attrs.size"
+                  :source.sync="scope.row"
+                  @change="changeCustomerName({ ...scope, selectData: $event })"
+                >
+                </component>
+              </template>
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot="header" slot-scope="scope">
                   <el-button :size="$attrs.size" @click="onRowAdd(tabName)">

+ 2 - 2
src/views/purchase/apply/edit/columns.js

@@ -279,10 +279,10 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "价格调整" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
             is: "el-select",
-            dictName: "is_effective",
+            dictName: "price_adjustment_type",
             disabled: true,
           },
         },

+ 30 - 1
src/views/purchase/apply/edit/index.vue

@@ -131,7 +131,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-            isPriceAdjustment = "N",
+            isPriceAdjustment = "",
           } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
@@ -155,6 +155,25 @@
           });
         }
       },
+      // 
+      async changeCustomerName(prop) {
+        console.log("prop", prop)
+        const {
+          puOrg,
+          supplier,
+          currency,
+          currencyCode,
+          currencyName,
+        } = this.params;
+        const {
+          recentlyPrice,
+          isApprovalFirst,
+          purchasequantity
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          prop.row.yPurchaseQuantity = purchasequantity
+          prop.row.recentlyPrice = recentlyPrice
+          prop.row.isApprovalFirst = isApprovalFirst
+      },
       //
       async fetchItem(prop) {
         try {
@@ -328,6 +347,16 @@
                 >
                 </component>
               </template>
+              <template slot="customerName" slot-scope="scope">
+                <component
+                  v-bind="scope.attr"
+                  v-model="scope.row[scope.item.key]"
+                  :size="$attrs.size"
+                  :source.sync="scope.row"
+                  @change="changeCustomerName({ ...scope, selectData: $event })"
+                >
+                </component>
+              </template>
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot="header" slot-scope="scope">
                   <el-button :size="$attrs.size" @click="onRowAdd(tabName)">

+ 2 - 2
src/views/purchase/apply/see/columns.js

@@ -167,10 +167,10 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "isPriceAdjustment", title: "价格调整" },
+          item: { width: 100, key: "isPriceAdjustment", title: "调价类型" },
           attr: {
             is: "el-dict-tag",
-            dictName: "is_effective",
+            dictName: "price_adjustment_type",
           },
         },
         {

+ 12 - 9
src/views/purchase/contract/add/columns.js

@@ -282,7 +282,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { key: "create_time", title: "合同创建时间", width: 100 },
+      item: { key: "createTime", title: "合同创建时间", width: 100 },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
     {
@@ -526,7 +526,7 @@ export default function useColumns() {
           item: {
             title: "物料名称",
             key: "materialName",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-popover-select-v2",
@@ -539,6 +539,8 @@ export default function useColumns() {
               registration: "registrationNo",
               specification: "specification",
               manufacturer: "manufacturerIdName",
+              tax: "materialRateName",
+              // tax: "materialRate",
             },
           },
         },
@@ -546,6 +548,7 @@ export default function useColumns() {
           item: {
             title: "物料编码",
             key: "material",
+            
           },
           attr: {},
         },
@@ -577,7 +580,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "税率%", key: "tax", required: true },
+          item: { title: "税率%", key: "tax", require: true },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "ntaxrate",
@@ -594,7 +597,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "含税单价", key: "taxPrice", required: true },
+          item: { title: "含税单价", key: "taxPrice", require: true },
           attr: {
             is: "el-input-number",
           },
@@ -610,7 +613,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "无税单价", key: "taxFreePrice", required: true },
+          item: { title: "无税单价", key: "taxFreePrice", require: true },
           attr: {
             formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
@@ -709,7 +712,7 @@ export default function useColumns() {
           item: {
             title: "付款起点",
             key: "origin",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-select",
@@ -717,14 +720,14 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "账期天数", key: "paymetDays", required: true },
+          item: { title: "账期天数", key: "paymetDays", require: true },
           attr: {
             is: "el-input-number",
             precision: 2,
           },
         },
         {
-          item: { title: "付款比例%", key: "ratio", required: true },
+          item: { title: "付款比例%", key: "ratio", require: true },
           attr: {
             is: "el-input-number",
           },
@@ -759,7 +762,7 @@ export default function useColumns() {
           item: {
             title: "结算方式",
             key: "paymentMeans",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-popover-select-v2",

+ 1 - 1
src/views/purchase/contract/columns.js

@@ -141,7 +141,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { width: 100, key: "create_time", title: "合同创建时间" },
+      item: { width: 100, key: "createTime", title: "合同创建时间" },
       attr: {},
     },
     {

+ 9 - 9
src/views/purchase/contract/edit/columns.js

@@ -285,7 +285,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { key: "create_time", title: "合同创建时间", width: 100 },
+      item: { key: "createTime", title: "合同创建时间", width: 100 },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
     {
@@ -513,7 +513,7 @@ export default function useColumns() {
           item: {
             title: "物料名称",
             key: "materialName",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-popover-select-v2",
@@ -564,7 +564,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "税率%", key: "tax", required: true },
+          item: { title: "税率%", key: "tax", require: true },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "ntaxrate",
@@ -581,7 +581,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "含税单价", key: "taxPrice", required: true },
+          item: { title: "含税单价", key: "taxPrice", require: true },
           attr: {
             is: "el-input-number",
           },
@@ -597,7 +597,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "无税单价", key: "taxFreePrice", required: true },
+          item: { title: "无税单价", key: "taxFreePrice", require: true },
           attr: {
             formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
@@ -696,7 +696,7 @@ export default function useColumns() {
           item: {
             title: "付款起点",
             key: "origin",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-select",
@@ -704,14 +704,14 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "账期天数", key: "paymetDays", required: true },
+          item: { title: "账期天数", key: "paymetDays", require: true },
           attr: {
             is: "el-input-number",
             precision: 2,
           },
         },
         {
-          item: { title: "付款比例%", key: "ratio", required: true },
+          item: { title: "付款比例%", key: "ratio", require: true },
           attr: {
             is: "el-input-number",
           },
@@ -746,7 +746,7 @@ export default function useColumns() {
           item: {
             title: "结算方式",
             key: "paymentMeans",
-            required: true,
+            require: true,
           },
           attr: {
             is: "el-popover-select-v2",

+ 1 - 1
src/views/purchase/contract/see/columns.js

@@ -737,7 +737,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { key: "create_time", title: "合同创建时间", width: 100 },
+      item: { key: "createTime", title: "合同创建时间", width: 100 },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" ,disabled:true,},
     },
     {

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

@@ -126,13 +126,15 @@ export default {
       <h4 class="m-0" style="font-weight: 500; flex: 1">
         {{ title.split("-")[0] }}
       </h4>
-      <el-button type="primary" :size="$attrs.size" :loading="loading" @click="handleJump">
+      <el-button 
+        v-if="params.flowId && params.flowId !== ''"
+        type="primary" :size="$attrs.size" :loading="loading" @click="handleJump">
           流程跳转
         </el-button>
         <subm-button
           :size="$attrs.size"
           :select-data="[{...this.params}]"
-          @success="hide"
+          @success="fetchItem(params.id)"
         ></subm-button>
       <!-- <el-button
         type="primary"

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

@@ -229,7 +229,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="[10, 20, 50, 100, 200, 500]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

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

@@ -145,7 +145,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="[10, 20, 50, 100, 200, 500]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>