Browse Source

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 years ago
parent
commit
fe599fdac1

+ 18 - 4
src/components/crop-select/main.vue

@@ -138,7 +138,8 @@ export default {
     cropIndex: Number,
     corpType: String,
     multiple: Boolean,
-    collapseTags: Boolean
+    collapseTags: Boolean,
+    belongtocompany: Number,
   },
   model: {
     prop: "value",
@@ -150,7 +151,8 @@ export default {
     this.title = getCustomerName(this.corpType);
     allCropList({
       corpType: getCustomerCode(this.corpType),
-      adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null
+      adminProfiles: !userObj.role_name.split(',').some(item => item == 'admin' || item == 'administrator') ? userObj.user_id : null,
+      belongtocompany: this.belongtocompany,
     }).then(res => {
       this.corpList = res.data.data;
     });
@@ -208,7 +210,8 @@ export default {
         current: page.currentPage,
         corpsTypeId: this.treeDeptId,
         corpType: getCustomerCode(this.corpType),
-        adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null
+        adminProfiles: !userObj.role_name.split(',').some(item => item == 'admin' || item == 'administrator') ? userObj.user_id : null,
+        belongtocompany: this.belongtocompany
       });
       this.loading = true;
       customerList(queryParams)
@@ -274,7 +277,18 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-    }
+    },
+    // 更新数据
+    updateData(belongToCompany) {
+      let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
+      allCropList({
+        corpType: getCustomerCode(this.corpType),
+        adminProfiles: !userObj.role_name.split(',').some(item => item == 'admin' || item == 'administrator') ? userObj.user_id : null,
+        belongtocompany: belongToCompany,
+      }).then(res => {
+        this.corpList = res.data.data;
+      });
+    },
   }
 };
 </script>

+ 11 - 1
src/components/finance/financialAccount.vue

@@ -331,7 +331,17 @@
         size: 10000,
         current: 1
       }).then(res => {
-        this.corpOption = res.data.data.records? res.data.data.records: [];
+        // this.corpOption = res.data.data.records? res.data.data.records: [];
+        if (res.data.data.total > 0) {
+          this.corpOption = res.data.data.records;
+          if (Math.ceil(res.data.data.total / 10) > 1) {
+            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+              customerList({current: i, size: 10}).then(e => {
+                this.corpOption = this.corpOption.concat(e.data.data.records);
+              });
+            }
+          }
+        }
       })
       this.loading = true;
       feeList({size: 10000, current: 1}).then(res => {

+ 1 - 1
src/components/price-Library/configuration/mainList.json

@@ -72,7 +72,7 @@
     },
     {
       "label": "供应商",
-      "prop": "corpId",
+      "prop": "corpCode",
       "index": 7,
       "width": 100,
       "overHidden": true

+ 0 - 3
src/components/price-Library/main.vue

@@ -44,9 +44,6 @@
                   :configuration="goodsConfiguration"
                 />
               </template>
-              <template slot="corpId" slot-scope="{ row }">
-                <span>{{ row.corpName }}</span>
-              </template>
             </avue-crud>
           </el-col>
         </el-row>

+ 1 - 1
src/enums/tax-rate.js

@@ -14,5 +14,5 @@ export const taxRates = [{
 }]
 // 订单状态过滤器
 export const taxRateFormat = (num) => {
-  return Number(num?num:0)+'%'
+  return num!=null?Number(num)+'%':'-'
 }

+ 6 - 0
src/views/basicData/productInformation/configuration/mainList.json

@@ -102,6 +102,12 @@
       "overHidden": true
     },
     {
+      "label": "所属公司",
+      "prop": "artsVisionName",
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "备注",
       "prop": "remarks",
       "width": 100,

+ 34 - 11
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -41,6 +41,13 @@
               typeData="GYS"
             />
           </template>
+          <template slot="artsVision">
+            <crop-select
+              v-model="form.artsVision"
+              @getCorpData="getCorpName"
+              corpType="GS"
+            ></crop-select>
+          </template>
           <template slot="cntrVolumn" slot-scope="scope">
             <el-input
               v-input-limit="2"
@@ -209,7 +216,7 @@ export default {
               {
                 required: true,
                 message: " ",
-                trigger: "blur"
+                trigger: "change"
               }
             ]
           },
@@ -226,20 +233,32 @@ export default {
             ]
           },
           {
-            label: "级别(负荷指数)",
-            prop: "specsOne",
-            span: 8,
+            label: "所属公司",
+            prop: "artsVision",
+            span:16,
             rules: [
               {
                 required: false,
                 message: " ",
+                trigger: "change"
+              }
+            ]
+          },
+          {
+            label: "产地",
+            prop: "placeProduction",
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: " ",
                 trigger: "blur"
               }
             ]
           },
           {
-            label: "级别2(速级)",
-            prop: "specsTwo",
+            label: "级别(负荷指数)",
+            prop: "specsOne",
             span: 8,
             rules: [
               {
@@ -250,8 +269,8 @@ export default {
             ]
           },
           {
-            label: "级别3(加强型)",
-            prop: "level",
+            label: "级别2(速级)",
+            prop: "specsTwo",
             span: 8,
             rules: [
               {
@@ -262,12 +281,12 @@ export default {
             ]
           },
           {
-            label: "产地",
-            prop: "placeProduction",
+            label: "级别3(加强型)",
+            prop: "level",
             span: 8,
             rules: [
               {
-                required: true,
+                required: false,
                 message: " ",
                 trigger: "blur"
               }
@@ -407,6 +426,7 @@ export default {
           if (typeof this.form.goodsTypeId !== 'string') {
             this.form.goodsTypeId = this.form.goodsTypeId.join(',')
           }
+          if (!this.form.artsVision) this.$set(this.form, 'artsVisionName', null);
           const params = {
             ...this.form,
             type: 0
@@ -440,6 +460,9 @@ export default {
       });
       if (res === true) loading.close();
     },
+    getCorpName(row) {
+      this.$set(this.form, 'artsVisionName', row.cname);
+    },
   }
 };
 </script>

+ 3 - 0
src/views/basicData/rateManagement/detailsPage.vue

@@ -46,6 +46,7 @@
               :controls="false"
               style="width: 100%"
               placeholder="请输入 默认汇率"
+              :disabled="detailData.status == 1"
             ></el-input-number>
           </template>
           <template slot="standardMoney">
@@ -53,6 +54,7 @@
               v-model="form.standardMoney"
               :active-value="1"
               :inactive-value="0"
+              :disabled="detailData.status == 1"
             >
             </el-switch>
           </template>
@@ -61,6 +63,7 @@
               size="small"
               type="primary"
               @click="createExRate"
+              :disabled="detailData.status == 1"
             >产生汇率项目</el-button>
           </template>
         </avue-form>

+ 2 - 1
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -29,7 +29,8 @@
     },
     {
       "name": "totalQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column": [

+ 2 - 1
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -29,7 +29,8 @@
     },
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column":[

+ 4 - 2
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -29,11 +29,13 @@
     },
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "actualQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column": [

+ 10 - 0
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -26,6 +26,16 @@
     {
       "name": "amount",
       "type": "sum"
+    },
+    {
+      "name": "orderQuantity",
+      "type": "sum",
+      "decimals": 0
+    },
+    {
+      "name": "actualQuantity",
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column":[

+ 4 - 2
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -44,11 +44,13 @@
     },
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "actualQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column": [

+ 24 - 17
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -109,6 +109,8 @@
                   corpType="KH"
                   :disabled="detailData.seeDisabled || browse"
                   style="width: 100%"
+                  ref="KHSelect"
+                  :belongtocompany="form.belongToCorpId"
                 ></crop-select>
                 <crop-select
                   v-else-if="item.prop === 'belongToCorpId'"
@@ -330,7 +332,9 @@
             </template>
             <template slot="cname" slot-scope="{ row }">
               <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"
-                               :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"/>
+                               :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"
+                            :artsVision="form.belongToCorpId"
+              />
               <span v-else>
                 {{row.cname}}
               </span>
@@ -1269,7 +1273,7 @@ export default {
           {
             label: '客户全称',
             prop: 'corpId',
-            span: 16,
+            span: 8,
             rules: [
               {
                 required: true,
@@ -1280,6 +1284,7 @@ export default {
           }, {
             label: '到货地址',
             prop: 'arrivalAddress',
+            span:16,
             rules: [
               {
                 required: true,
@@ -1290,7 +1295,7 @@ export default {
           }, {
             label: '生产工厂',
             prop: 'productionPlant',
-            span: 16,
+            span: 8,
             rules: [
               {
                 required: true,
@@ -1303,6 +1308,7 @@ export default {
             label: '发货地址',
             prop: 'shippingAddress',
             disabled: false,
+            span: 16,
             rules: [
               {
                 required: true,
@@ -1313,7 +1319,7 @@ export default {
           }, {
             label: '所属公司',
             prop: 'belongToCorpId',
-            span: 16,
+            span: 8,
             rules: [
               {
                 required: true,
@@ -1331,7 +1337,17 @@ export default {
                 trigger: 'change'
               }
             ]
-          }, {
+          },{
+            label: '包装要求',
+            prop: 'packageRemarks',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'change'
+              }
+            ]
+          },  {
             label: '银行帐号',
             prop: 'banks',
             type: 'select',
@@ -1363,16 +1379,6 @@ export default {
               }
             ]
           }, {
-            label: '包装要求',
-            prop: 'packageRemarks',
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'change'
-              }
-            ]
-          }, {
             label: '销售订单号',
             prop: 'orderNo',
             disabled: true,
@@ -2713,9 +2719,9 @@ export default {
       done()
     },
     //商品列表查询
-    onLoad(page, params = {}) {
+    onLoad(page, params = {artsVision: this.form.belongToCorpId}) {
       this.loading = true;
-      getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, this.form.belongToCorpId).then(res => {
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
         this.pageList.total = data.total
@@ -3034,6 +3040,7 @@ export default {
       }
     },
     returnBack(row) {
+      this.$refs.KHSelect[0].updateData(row.id)
       getKHList({corpType: 'KH', belongtocompany: row.id}).then(res => {
         this.form.corpId = res.data.data.records.length > 0? res.data.data.records[0].id: null
         if (this.form.corpId) {

+ 2 - 1
src/views/dealer/purchase/config/customerContact.json

@@ -15,7 +15,8 @@
   "sumColumnList": [
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "price",

+ 2 - 1
src/views/dealer/purchase/config/mainList.json

@@ -23,7 +23,8 @@
   "sumColumnList": [
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "debitAmount",

+ 11 - 2
src/views/dealer/purchase/detail.vue

@@ -675,8 +675,17 @@ export default {
     this.getWorkDicts('unit').then(res => {
       this.unitOption = res.data.data;
     })
-    getGoods(1, 500).then(res => {
-      this.goodsoptions = res.data.data.records;
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
     });
     getUserInfo().then(res => {
       this.$set(this.form, 'createUserName', res.data.data.realName)

+ 2 - 1
src/views/dealer/sales/config/customerContact.json

@@ -15,7 +15,8 @@
   "sumColumnList": [
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "price",

+ 2 - 1
src/views/dealer/sales/config/mainList.json

@@ -22,7 +22,8 @@
   "sumColumnList": [
     {
       "name": "orderQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "debitAmount",

+ 11 - 2
src/views/dealer/sales/detail.vue

@@ -745,8 +745,17 @@ export default {
       this.getColumnName(80),
       goodsOption
     );
-    getGoods(1, 500).then(res => {
-      this.goodsoptions = res.data.data.records;
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
     });
     getUserInfo().then(res => {
       this.$set(this.form, 'createUserName', res.data.data.realName)

+ 4 - 2
src/views/dealer/stock/config/mainList.json

@@ -25,11 +25,13 @@
   "sumColumnList": [
     {
       "name": "balanceQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     },
     {
       "name": "surplusRouteQuantity",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column": [

+ 1 - 1
src/views/maintenance/priceLibrary/config/mainList.json

@@ -58,7 +58,7 @@
     },
     {
       "label": "供应商",
-      "prop": "corpId",
+      "prop": "corpCode",
       "search": true,
       "searchSpan": 8,
       "index": 6,

+ 2 - 5
src/views/maintenance/priceLibrary/index.vue

@@ -51,8 +51,8 @@
             :false-label="0"
           />
         </template>
-        <template slot="corpIdSearch">
-          <crop-select v-model="search.corpId" corpType="GYS"></crop-select>
+        <template slot="corpCodeSearch">
+          <crop-select v-model="search.corpCode" corpType="GYS"></crop-select>
         </template>
         <template slot="dateValiditySearch">
           <el-date-picker
@@ -66,9 +66,6 @@
           >
           </el-date-picker>
         </template>
-        <template slot-scope="{ row }" slot="corpId">
-          {{ row.corpName }}
-        </template>
         <template slot-scope="{ row }" slot="grossProfitRate">
           {{ row.grossProfitRate ? scope.row.grossProfitRate : 0 }}%
         </template>