Pārlūkot izejas kodu

Merge branch 'dev' into 'purchaseDev'

Dev

See merge request new-business/drp-web!399
黄梓星 1 gadu atpakaļ
vecāks
revīzija
f4cbb1e821

+ 2 - 2
src/api/business/purchase/apply.js

@@ -9,9 +9,9 @@ export function LIST(data, params) {
   });
 }
 
-export function ITEM(data) {
+export function ITEM(data, isCopy) {
   return request({
-    url: `/pu/priceApply/${data}`,
+    url: `/pu/priceApply/${data}/${isCopy}`,
     method: "GET",
   });
 }

+ 9 - 0
src/api/system/role.js

@@ -117,3 +117,12 @@ export function deptTreeSelect(roleId) {
     method: 'get'
   })
 }
+
+// 角色列表
+export function listOptionselect(query) {
+  return request({
+    url: '/system/role/optionselect',
+    method: 'get',
+    params: query
+  })
+}

+ 3 - 1
src/views/business/spd/task_management/visitingPlan/add.vue → src/views/business/spd/bo/plan/add.vue

@@ -168,7 +168,7 @@
           <el-table-column show-overflow-tooltip label="联系人" prop="contactName" min-width="230" :render-header="addRedStar">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'mkBoPlanItemList.' + scope.$index + '.' + 'contactName'" :rules="{ required: true, message: '请选择联系人', trigger: 'blur' }">
-                <el-select clearable size="mini" v-model="scope.row.contactName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'LINKMAN_PARAM', true, '请选择联系人', {customer: scope.row.customer, charger: basicForm.charger})" style="width: 200px">
+                <el-select clearable size="mini" v-model="scope.row.contactName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'LINKMAN_PARAM', true, '请选择联系人', {customer: scope.row.customer})" style="width: 200px">
                   <el-option v-for="item in linkOptions" :key="item.id" :label="item.name" :value="item.code" />
                 </el-select>
               </el-form-item>
@@ -508,9 +508,11 @@ export default {
       console.log('删除的数组',this.delPlanItemList)
     },
     edit() {
+      this.getDetails(this.row)
       this.isFlag = true;
       this.sonPageStu = 'edit'
       this.sonDisable = false
+      //调整日期格式
       this.basicForm.startDate = this.basicForm.startDate + ' 00:00:00'
       this.basicForm.deadlineTime = this.basicForm.deadlineTime + ' 00:00:00'
       this.basicForm.mkBoPlanItemList.forEach(item => {

+ 0 - 0
src/views/business/spd/task_management/visitingPlan/index.vue → src/views/business/spd/bo/plan/index.vue


+ 8 - 0
src/views/material/requisition/columns.js

@@ -87,6 +87,14 @@
         clearable:true,
       },
     },
+   {
+     item: { key: "materialCodes", title: "物料编码" },
+     attr: {
+       clearable: true,
+       is: "el-input",
+       placeholder: '多物料编码使用 , 隔开',
+     },
+   },
     {
       item: { key: "classifySearchList", title: "品类" },
       attr: {

+ 11 - 15
src/views/purchase/apply/add/columns.js

@@ -337,40 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice
-                ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(
-                    2
-                  )
-                : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : prop * 1;
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount =
-                Number(priceDiffer) * Number(yPurchaseQuantity));
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount =
+                Number(priceDiffer) * Number(ypurchaseQuantity));
             },
           },
         },

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

@@ -86,7 +86,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "", priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -122,7 +122,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst

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

@@ -337,36 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(2) : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount = (
-                Number(priceDiffer) * Number(yPurchaseQuantity)
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount = (
+                Number(priceDiffer) * Number(ypurchaseQuantity)
               ));
             },
           },

+ 4 - 3
src/views/purchase/apply/copy/index.vue

@@ -102,7 +102,7 @@ export default {
         const {
           recentlyPrice = "0",
           isApprovalFirst = "N",
-        } = await fetchExist({ puOrg, customer, supplier, materialCode });
+        } = await fetchExist({ puOrg, customer, supplier, materialCode, priceType: prop.row.priceType });
         this.loading = false;
         await this.onRowAdd(this.tabName, {
           ...item,
@@ -138,7 +138,7 @@ export default {
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -152,7 +152,8 @@ export default {
         const { TableColumns } = TabColumns.find(
           ({ item: { key } }) => key === tabName
         );
-        const { code, data } = await ITEM(prop);
+        console.log('看看prop', prop)
+        const { code, data } = await ITEM(prop, true);
         if (code === 200) {
           this.params = data;
           this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 12 - 16
src/views/purchase/apply/edit/columns.js

@@ -87,7 +87,7 @@ export default function useColumns() {
     },
     {
       item: { key: "sourceType", title: "来源单据类型" },
-      attr: { is: "el-input", disabled: true, readonly: true },
+      attr: { is: "el-select", dictName: "price_source", disabled: true, readonly: true },
     },
     {
       item: { key: "status", title: "单据状态" },
@@ -337,40 +337,36 @@ export default function useColumns() {
           attr: {
             formatter: (prop) => {
               const { priceDiffer = 0, recentlyPrice = 0 } = prop;
-              return (prop.increase = recentlyPrice
-                ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(
-                    2
-                  )
-                : "0.00");
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%': "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             formatter: (prop) => {
-              const { priceDiffer = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yAffectedAmount = (
-                Number(priceDiffer) * Number(yPurchaseQuantity)
+              const { priceDiffer = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.yaffectedAmount = (
+                Number(priceDiffer) * Number(ypurchaseQuantity)
               ));
             },
           },

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

@@ -131,7 +131,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "",priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -168,7 +168,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -182,7 +182,7 @@
           const {TableColumns} = TabColumns.find(
             ({item: {key}}) => key === tabName
           );
-          const {code, data} = await ITEM(prop);
+          const {code, data} = await ITEM(prop, false);
           if (code === 200) {
             this.params = data;
             this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 13 - 11
src/views/purchase/apply/see/columns.js

@@ -51,7 +51,10 @@ export default function useColumns() {
     },
     {
       item: { width: 100, key: "sourceType", title: "来源单据类型" },
-      attr: {},
+      attr: {
+        is: "el-dict-tag",
+        dictName: "price_source",
+      },
     },
     {
       item: { width: 100, key: "status", title: "单据状态" },
@@ -169,7 +172,6 @@ export default function useColumns() {
         {
           item: { width: 100, key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
-            is: "el-dict-tag",
           },
         },
         {
@@ -214,33 +216,33 @@ export default function useColumns() {
         {
           item: { width: 100, key: "increase", title: "涨幅" },
           attr: {
-            is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              const { priceDiffer = 0, recentlyPrice = 0 } = prop;
+              return (prop.increase = recentlyPrice ? ((Number(priceDiffer) / Number(recentlyPrice)) * 100).toFixed(1) + '%' : "0.0%");
             },
           },
         },
 
         {
-          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "ypurchaseQuantity", title: "预计年采购量" },
           attr: {
-            is: "el-computed-input-v2",
+            // is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
+              return prop.ypurchaseQuantity
             },
           },
         },
         {
-          item: { width: 100, key: "yPurchaseVolume", title: "预计年采购额" },
+          item: { width: 100, key: "ypurchaseVolume", title: "预计年采购额" },
           attr: {
             formatter: (prop) => {
-              const { taxPrice = 0, yPurchaseQuantity = 0 } = prop;
-              return (prop.yPurchaseVolume = (Number(taxPrice) * Number(yPurchaseQuantity)).toFixed(2));
+              const { taxPrice = 0, ypurchaseQuantity = 0 } = prop;
+              return (prop.ypurchaseVolume = (Number(taxPrice) * Number(ypurchaseQuantity)).toFixed(2));
             },
           },
         },
         {
-          item: { width: 100, key: "yAffectedAmount", title: "预计年影响金额" },
+          item: { width: 100, key: "yaffectedAmount", title: "预计年影响金额" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {

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

@@ -67,7 +67,7 @@ export default {
           total,
           rows: [{ id }],
         } = await LIST({ ...model }, { pageNum: prop, pageSize: 1 });
-        const { code, data } = await ITEM(id);
+        const { code, data } = await ITEM(id, false);
         if (code === 200) {
           this.params = data;
           this.params.$index = prop;

+ 8 - 0
src/views/purchase/catalogue/columns.js

@@ -137,6 +137,14 @@ export default function useColumns() {
         referName: "MATERIAL_PARAM",
       },
     },
+    {
+      item: { key: "materialCodes", title: "物料编码"},
+      attr: {
+        clearable: true,
+        is: "el-input",
+        placeholder: '多物料编码使用 , 隔开',
+      },
+    },
     // {
     //   item: { width: 100, key: "materialCodeList", title: "物料编码" },
     //   attr: {

+ 4 - 1
src/views/purchase/catalogue/see/columns.js

@@ -30,7 +30,10 @@ export default function useColumns() {
     { item: { width:100,key: "effectiveDate", title: "价格生效日期" }, attr: {} },
     { item: { width:100,key: "endDate", title: "价格失效日期" }, attr: {} },
     { item: { width:100,key: "buyerName", title: "采购员" }, attr: {} },
-    { item: { width:100,key: "source", title: "来源单据" }, attr: {} },
+    { item: { width:100,key: "source", title: "来源单据" }, attr: {
+      is: "el-dict-tag",
+      dictName: "price_source",
+    } },
     {
       item: { width:100,key: "convertRate", title: "换算率" },
       attr: {

+ 11 - 5
src/views/system/table-template/auth-dialog.vue

@@ -1,6 +1,7 @@
 <script>
 import { role, auth } from "@/api/system/table-template";
-import { listRole } from "@/api/system/role";
+// import { listRole } from "@/api/system/role";
+import { listOptionselect } from "@/api/system/role";
 export default {
   name: "AuthDialog",
   data() {
@@ -19,10 +20,15 @@ export default {
       this.form.id = id;
       this.loading = true;
       this.dialogFormVisible = true;
-      listRole({ id })
+      listOptionselect({ id })
         .then((res) => {
-          let { rows, total } = res;
-          this.roleList = rows.map((item) => ({
+          // let { rows, total } = res;
+          // this.roleList = rows.map((item) => ({
+          //   key: item.roleId,
+          //   label: item.roleName,
+          // }));
+          let { data } = res;
+          this.roleList = data.map((item) => ({
             key: item.roleId,
             label: item.roleName,
           }));
@@ -65,7 +71,7 @@ export default {
   <el-dialog
     width="fit-content"
     destroy-on-close
-    title="权"
+    title="权"
     :visible.sync="dialogFormVisible"
   >
     <el-transfer