ソースを参照

收款结算客户模糊查询和添加轮胎的单价参数添加

caojunjie 2 年 前
コミット
e23724cb00

+ 23 - 0
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -78,6 +78,25 @@
                 <el-input v-model="row.priceTwo" size="small"></el-input>
                 <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
               </template>
+                <!--花纹-->
+                <template slot-scope="{row}" slot="brandItem">
+                    <!--<el-select-->
+                    <!--    v-model="row.brandItem"-->
+                    <!--    multiple-->
+                    <!--    filterable-->
+                    <!--    remote-->
+                    <!--    reserve-keyword-->
+                    <!--    placeholder="请输入关键词"-->
+                    <!--    :remote-method="remoteMethod"-->
+                    <!--    :loading="loading">-->
+                    <!--    <el-option-->
+                    <!--        v-for="item in goodsListShow"-->
+                    <!--        :key="item.value"-->
+                    <!--        :label="item.brandItem"-->
+                    <!--        :value="item.value">-->
+                    <!--    </el-option>-->
+                    <!--</el-select>-->
+                </template>
               <template slot="priceThree" slot-scope="{ row }">
                 <el-input v-model="row.priceThree" size="small"></el-input>
                 <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
@@ -263,6 +282,10 @@ export default {
           label: '花纹',
           prop: 'brandItem',
           disabled: true,
+          // search: true,  // 是否搜索
+          // type: 'select',
+          // remote:true, // 是否为远程搜索
+          // dicUrl:'/api/blade-sales-part/productLaunch/list?brandItem={{key}}',   //key为当前输入值
           overHidden: true,
         }, {
           label: '公司',

+ 20 - 3
src/views/tirePartsMall/configuration/commodity.json

@@ -52,6 +52,19 @@
       "overHidden": true
     },
     {
+      "label": "单价",
+      "prop":"price",
+      "overHidden": true,
+      "slot": true,
+      "width": 120,
+      "cell": true,
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "blur"
+      }]
+    },
+    {
       "label": "库存",
       "prop": "inventory",
       "hide": true,
@@ -63,7 +76,8 @@
       "label": "轮胎编码",
       "prop": "code",
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "width": "120"
     },
     {
       "label": "品牌",
@@ -75,13 +89,16 @@
       "label": "规格型号",
       "prop": "specificationAndModel",
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "search": true,
+      "width": "120"
     },
     {
       "label": "花纹",
       "prop": "brandItem",
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "search": true
     },
     {
       "label": "轮胎描述",

+ 21 - 2
src/views/tirePartsMall/configuration/commodityxsho.json

@@ -52,6 +52,19 @@
       "overHidden": true
     },
     {
+      "label": "单价",
+      "prop":"price",
+      "overHidden": true,
+      "slot": true,
+      "width": 120,
+      "cell": true,
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "blur"
+      }]
+    },
+    {
       "label": "库存",
       "prop": "inventory",
       "addDisabled": false,
@@ -61,13 +74,16 @@
     {
       "label": "规格型号",
       "prop": "specificationAndModel",
+      "width": "120",
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "search": true
     },
     {
       "label": "公司",
       "prop": "salesCompanyName",
       "slot": true,
+      "width": "120",
       "overHidden": true
     },
     {
@@ -80,13 +96,16 @@
     {
       "label": "花纹",
       "prop": "brandItem",
+      "width": "120",
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "search": true
     },
     {
       "label": "共享公司",
       "prop": "sharedCompany",
       "slot": true,
+      "width": "120",
       "overHidden": true
     }
   ]

+ 16 - 11
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -24,16 +24,16 @@
     <div style="margin-top: 50px">
       <trade-card title="基础信息">
         <avue-form :option="optionForm" v-model="form" ref="form">
-            <template slot-scope="scope" slot="corpId">
-                <el-select v-model="form.corpId" placeholder="请选择">
-                    <el-option
-                        v-for="item in corpIdData"
-                        :key="item.id"
-                        :label="item.cname"
-                        :value="item.id">
-                    </el-option>
-                </el-select>
-            </template>
+            <!--<template slot-scope="scope" slot="corpId">-->
+            <!--    <el-select v-model="form.corpId" placeholder="请选择">-->
+            <!--        <el-option-->
+            <!--            v-for="item in corpIdData"-->
+            <!--            :key="item.id"-->
+            <!--            :label="item.cname"-->
+            <!--            :value="item.id">-->
+            <!--        </el-option>-->
+            <!--    </el-select>-->
+            <!--</template>-->
             <!--<template slot-scope="scope" slot="settlementDate">-->
             <!--    <el-date-picker-->
             <!--        v-model="value1"-->
@@ -128,11 +128,16 @@ export default {
             value: 'id'
           },
           dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
+            change: (row, column, value) => {
+                console.log(row,132)
+                console.log(column,133)
+                column[1].searchValue = value;
+            },
           rules: [{
             required: true,
             message: " ",
             trigger: "blur"
-          }]
+          }],
         }, {
           label: '收款账户',
           prop: "accountName",

+ 5 - 0
src/views/tirePartsMall/financialManagement/collectionSettlement/index.vue

@@ -99,6 +99,11 @@ export default {
             value: 'id'
           },
           dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
+            change: (row, column, value) => {
+                console.log(row,132)
+                console.log(column,133)
+                column[1].searchValue = value;
+            },
           click: () => {
             console.log('555555');
             this.$refs.crud.dicInit()

+ 63 - 16
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -128,7 +128,7 @@
                                 </span>
                             </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button v-if="mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
+                                <el-button v-if="row.mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
                                 </el-button>
                                 <el-button v-else :size="size" :disabled="disabled || isAdd" :type="type"
@@ -218,7 +218,7 @@
                     <basic-container>
                         <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
                                    @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
-                                   :page.sync="page" @on-load="onLoad"
+                                   :page.sync="page" @on-load="onLoadfun"
                                    @resetColumn="resetCrud" @saveColumn="saveCrud" >
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
@@ -239,6 +239,12 @@
                                 <span v-else>{{ row.dot }}</span>
                             </template>
 
+                            <template slot="price" slot-scope="{row}">
+                                <el-input-number v-if="form.storageId && row.whether=='1'" v-model="row.price" size="small" :controls="false"
+                                                 style="width: 100%" />
+                                <span v-else>{{ row.price }}</span>
+                            </template>
+
                             <template slot-scope="scope" slot="menu">
                                 <el-button type="text" icon="el-icon-edit" size="small"
                                            @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
@@ -284,7 +290,7 @@ export default {
     data() {
         return {
             // 编辑还是保存
-            mingxibaocun:true,
+            // mingxibaocun:true,
             // 批次号请求到的数据
             picihaolist:[],
             // 添加轮胎弹窗
@@ -1161,7 +1167,7 @@ export default {
         nodeClick(data) {
             this.treeDeptId = data.id;
             this.page.currentPage = 1;
-            this.onLoad(this.page, {goodsTypeId:this.treeDeptId});
+            this.onLoadfun(this.page, {goodsTypeId:this.treeDeptId});
         },
         closeGoods() {
             this.treeDataGoods = [];
@@ -1172,7 +1178,7 @@ export default {
         refreshChange() {
             this.treeDeptId = ''
             this.page.currentPage = 1;
-            this.onaloadfun(this.page);
+            this.onLoadfun(this.page);
         },
         // 这个方法是解决 this.onLoad is not a function 的问题
         onaloadfun(page, params = { artsVision: this.form.belongToCorpId }) {
@@ -1188,6 +1194,25 @@ export default {
                 this.pageList.total = data.total
                 this.data = data.records;
                 this.goodsListShow = data.records;
+
+                // // 获取单价数据
+                // for(let item of this.goodsListShow) {
+                //     let page = {}
+                //     if (this.form.storageId) {
+                //         page.storageId = this.form.storageId
+                //     }
+                //     page.goodsId = item.goodsId
+                //     if (this.form.storageId) {
+                //         dotList(page).then(res=>{
+                //             console.log(res.data.data,1206)
+                //             item.price = res.data.data[0].inventoryCostPrice
+                //             // console.log(item)
+                //         })
+                //     }
+                //
+                // }
+
+
                 this.loading = false;
             })
             // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
@@ -1210,7 +1235,7 @@ export default {
                 ...params,
                 artsVision: this.form.belongToCorpId
             }
-            this.onLoad(this.page, params);
+            this.onLoadfun(this.page, params);
             done()
         },
         // 标签页切换
@@ -1226,9 +1251,9 @@ export default {
         // 商品信息价格计算
         amountChange(row) {
             // 价格
-            if (!row.price) {
-                row.price = 0;
-            }
+            // if (!row.price) {
+            //     row.price = 0;
+            // }
         },
         importStagList(row, index, type) {
             this.goodsListSave.push(row);
@@ -1265,22 +1290,25 @@ export default {
                     console.log(res.data,'获取到的数据')
                     let obj = {}
                     if(res.data.data.length>0){
-                        obj.price = res.data.data[0].inventoryCostPrice,
+                        // obj.price = res.data.data[0].inventoryCostPrice,
                         obj.inventory = res.data.data[0].balanceQuantity,
                         obj.pattern = res.data.data[0].brandItem,
                         obj.goodsDescription = res.data.data[0].productDescription,
+                            // 规格型号
+                            obj.propertyName = res.data.data[0].typeno,
                             // 小计
                         obj.subTotalMoney = item.goodsNum * res.data.data[0].inventoryCostPrice
                     }
                     this.form.orderItemsList.push({
                         ...obj,
-                        goodsId:item.goodsId,
+                        price:item.price,
+                        goodsId:item.id,
                         goodsName:item.cname,
                         dot:item.dot,
                         brandName:item.brandName,
                         brandId:item.brandId,
                         goodsNo:item.code,
-                        propertyName:item.typeno,
+                        // propertyName:item.typeno,
 
                         goodsNum:item.goodsNum,
                         units:item.unit,
@@ -1294,7 +1322,9 @@ export default {
                         // 价格数量
                         goodsNumtype:false,
                         // 价格
-                        pricetype:false
+                        pricetype:false,
+                        // 是否是编辑状态
+                        mingxibaocun:true
                     })
                 })
             }
@@ -1306,7 +1336,7 @@ export default {
         },
 
         //导入轮胎弹窗列表查询
-        onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
+        onLoadfun(page, params = { artsVision: this.form.belongToCorpId }) {
             this.loading = true;
             getList({
                 ...params,
@@ -1319,6 +1349,23 @@ export default {
                 this.pageList.total = data.total
                 this.data = data.records;
                 this.goodsListShow = data.records;
+
+                // 获取单价数据
+                for(let item of this.goodsListShow) {
+                    let page = {}
+                    if (this.form.storageId) {
+                        page.storageId = this.form.storageId
+                    }
+                    page.goodsId = item.id
+                    if (this.form.storageId && item.whether=='1') {
+                        dotList(page).then(res=>{
+                            console.log(res.data.data,1206)
+                            item.price = res.data.data[0].inventoryCostPrice
+                            // console.log(item)
+                        })
+                    }
+                }
+
                 this.loading = false;
             })
             // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
@@ -1339,14 +1386,14 @@ export default {
             row.goodsNumtype = true
             row.pricetype = true
             // 编辑和保存状态切换
-            this.mingxibaocun = false
+            row.mingxibaocun = false
         },
         // 保存按钮
         hangbaocun(row) {
             row.dotedittype = false
             row.goodsNumtype = false
             row.pricetype = false
-            this.mingxibaocun = true
+            row.mingxibaocun = true
         },
         // 批次号获取数据
         picihaolistfun(goodsId){

+ 49 - 16
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -109,7 +109,7 @@
                                 </span>
                             </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button v-if="mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
+                                <el-button v-if="row.mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
                                            :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
                                 </el-button>
                                 <el-button v-else :size="size" :disabled="disabled || isAdd" :type="type"
@@ -186,7 +186,7 @@
                     <basic-container>
                         <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
                                    @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
-                                   :page.sync="page" @on-load="onLoad"
+                                   :page.sync="page" @on-load="onLoadfun"
                                    @resetColumn="resetCrud" @saveColumn="saveCrud">
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
@@ -205,6 +205,10 @@
                                 </el-select>
                                 <!--<span v-else>{{ row.dot }}</span>-->
                             </template>
+                            <template slot="price" slot-scope="{row}">
+                                <el-input-number v-model="row.price" size="small" :controls="false"
+                                                 style="width: 100%" />
+                            </template>
                             <template slot-scope="scope" slot="menu">
                                 <el-button type="text" icon="el-icon-edit" size="small"
                                            @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
@@ -250,7 +254,7 @@ export default {
     data() {
         return {
             // 编辑还是保存
-            mingxibaocun:true,
+            // mingxibaocun:true,
             // 批次号请求到的数据
             picihaolist:[],
             // 添加轮胎弹窗
@@ -1098,7 +1102,7 @@ export default {
         nodeClick(data) {
             this.treeDeptId = data.id;
             this.page.currentPage = 1;
-            this.onLoad(this.page, {brandId:this.treeDeptId});
+            this.onLoadfun(this.page, {brandId:this.treeDeptId});
         },
         closeGoods() {
             this.treeDataGoods = [];
@@ -1109,9 +1113,9 @@ export default {
         refreshChange() {
             this.treeDeptId = ''
             this.page.currentPage = 1;
-            this.onaloadfun(this.page);
+            this.onLoadfun(this.page);
         },
-        // 这个方法是解决 this.onLoad is not a function 的问题
+        // 这个方法是解决 this.onLoad is not a function 的问题  喜欢函数名和变量名用一样的是吧? 嗯?
         onaloadfun(page, params = { artsVision: this.form.belongToCorpId }) {
             this.loading = true;
             getList({
@@ -1127,6 +1131,7 @@ export default {
                 this.pageList.total = data.total
                 this.data = data.records;
                 this.goodsListShow = data.records;
+
                 this.loading = false;
             })
             // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
@@ -1154,7 +1159,7 @@ export default {
 
             // params.specificationAndModel = params.cname
             // delete params.cname
-            this.onLoad(this.page, params);
+            this.onLoadfun(this.page, params);
             done()
         },
         // 标签页切换
@@ -1170,9 +1175,9 @@ export default {
         // 商品信息价格计算
         amountChange(row) {
             // 价格
-            if (!row.price) {
-                row.price = 0;
-            }
+            // if (!row.price) {
+            //     row.price = 0;
+            // }
         },
         importStagList(row, index, type) {
             this.goodsListSave.push(row);
@@ -1215,7 +1220,9 @@ export default {
                     dotList(page).then(res=>{
                         console.log(res.data,'获取到的数据')
                         if(res.data.data.length>0){
-                            obj.price = res.data.data[0].inventoryCostPrice,
+                            // if (item.price) {
+                            //
+                            // }
                                 obj.inventory = res.data.data[0].balanceQuantity,
                                 obj.pattern = res.data.data[0].brandItem,
                                 obj.goodsDescription = res.data.data[0].productDescription,
@@ -1229,6 +1236,7 @@ export default {
                         }
                         this.form.orderItemsList.push({
                             ...obj,
+                            price:item.price,
                             goodsId:item.goodsId,
                             goodsName:item.cname,
                             goodsNum:item.goodsNum,
@@ -1243,7 +1251,10 @@ export default {
                             // 价格数量
                             goodsNumtype:false,
                             // 价格
-                            pricetype:false
+                            pricetype:false,
+                            // 编辑保存的状态
+                            mingxibaocun:true
+
                         })
                     })
                 })
@@ -1257,7 +1268,7 @@ export default {
         },
 
         //导入轮胎弹窗列表查询
-        onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
+        onLoadfun(page, params = { artsVision: this.form.belongToCorpId }) {
             this.loading = true;
             getList({
                 ...params,
@@ -1272,6 +1283,24 @@ export default {
                 this.pageList.total = data.total
                 this.data = data.records;
                 this.goodsListShow = data.records;
+
+
+                // 获取单价数据
+                for(let item of this.goodsListShow) {
+                    let page = {}
+                    if (this.form.storageId) {
+                        page.storageId = this.form.storageId
+                    }
+                    page.goodsId = item.goodsId
+                    dotList(page).then(res=>{
+                        // console.log(res.data.data[0].inventoryCostPrice)
+                        item.price = res.data.data[0].inventoryCostPrice
+                        // console.log(item)
+                    })
+                }
+                // 打开弹窗
+                // this.dialogVisible = true
+
                 this.loading = false;
             })
             // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
@@ -1292,14 +1321,14 @@ export default {
             row.goodsNumtype = true
             row.pricetype = true
             // 编辑和保存状态切换
-            this.mingxibaocun = false
+            row.mingxibaocun = false
         },
         // 保存按钮
         hangbaocun(row) {
             row.dotedittype = false
             row.goodsNumtype = false
             row.pricetype = false
-            this.mingxibaocun = true
+            row.mingxibaocun = true
         },
         // 批次号获取数据
         picihaolistfun(goodsId){
@@ -2126,7 +2155,11 @@ export default {
             }
             this.getAllWorkDicts()
             this.refreshChange()
-            this.dialogVisible = true
+
+            setTimeout(res=>{
+                this.dialogVisible = true
+            },300)
+
             // this.$refs.formContacts.rowAdd()
         },
         //打印