Browse Source

修改 销售订单 库间调拨 退货入库 出库工单

Qukatie 7 months ago
parent
commit
6b1455c3f0

+ 25 - 25
src/components/part-library/main.vue

@@ -13,7 +13,7 @@
                 <crop-select v-model="search.corpId" gysType="CK" corpType="GYS"></crop-select>
               </template>
               <template slot="menuLeft">
-                <el-button type="primary" size="small" @click.stop="addRow" :disabled="selectionList.length==0">选定配件
+                <el-button type="primary" size="small" @click.stop="addRow" :disabled="selectionList.length == 0">选定配件
                 </el-button>
               </template>
             </avue-crud>
@@ -59,7 +59,7 @@ export default {
       visible: false,
       loading: true,
       data: [],
-      search: {},
+      search: { code: "", ename: "", corpCode: "" },
       tableOption: option,
       height: window.innerHeight - 500,
       page: {
@@ -75,20 +75,20 @@ export default {
   },
   props: {},
   filters: {},
-    watch:{
-        // 监听
-        visible:{
-            // 执行方法
-            handler(oldValue,newValue) {
-                console.log(oldValue,145)
-                // if (!oldValue) {
-                //     this.search = {}
-                // }
-            },
-            deep: false, // 深度监听
-            immediate: false  // 第一次改变就执行
-        },
+  watch: {
+    // 监听
+    visible: {
+      // 执行方法
+      handler(oldValue, newValue) {
+        console.log(oldValue, 145)
+        // if (!oldValue) {
+        //     this.search = {}
+        // }
+      },
+      deep: false, // 深度监听
+      immediate: false  // 第一次改变就执行
     },
+  },
   created() {
     if (localStorage.getItem("roleName") == "贸易") {
       this.findObject(this.tableOption.column, "taxRate").hide = true;
@@ -102,6 +102,7 @@ export default {
       this.partType = status;
       this.pickData = partData ? JSON.parse(partData) : []
       this.visible = true;
+      this.search = { code: "", ename: "", corpCode: "" };
       this.page = {
         currentPage: 1,
         total: 0,
@@ -195,26 +196,26 @@ export default {
       let data = {
         ...params,
         billType: "CG",
-        goodsTypeName:this.getgoodsTypeName(this.partType),
+        goodsTypeName: this.getgoodsTypeName(this.partType),
         statusTime: dateFormat(new Date(), "yyyy-MM-dd")
       };
       let obj = Object.assign(data, this.search);
       this.loading = true;
       getPricebank(page.currentPage, page.pageSize, obj).then(res => {
-          this.data = res.data.data.records ? res.data.data.records : [];
-          this.page.total = res.data.data.total;
-          if (this.page.total > 0) {
-              this.tableOption.height = window.innerHeight - 350;
-          }
+        this.data = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        if (this.page.total > 0) {
+          this.tableOption.height = window.innerHeight - 350;
+        }
       }).finally(() => {
-          this.loading = false;
+        this.loading = false;
       });
     },
     selectionChange(list) {
       this.selectionList = list;
     },
     priceChange(row) {
-        row.amout = _.multiply(row.price, row.goodNumber).toFixed(2)
+      row.amout = _.multiply(row.price, row.goodNumber).toFixed(2)
     },
     importData() {
       this.$emit("importPart", this.pickData, this.partType);
@@ -230,5 +231,4 @@ export default {
 };
 </script>
 
-<style scoped lang="scss">
-</style>
+<style scoped lang="scss"></style>

+ 13 - 1
src/views/tirePartsMall/financialManagement/saleDetail/index.vue

@@ -69,6 +69,9 @@
             <template slot="isContainSearch">
                 <el-checkbox v-model="query.isContain" :true-label="1" :false-label="0"></el-checkbox>
             </template>
+            <template slot="whetherRebateSearch">
+                <el-checkbox v-model="query.whetherRebate" :true-label="1" :false-label="0"></el-checkbox>
+            </template>
             <template slot-scope="{ row, index }" slot="ordNo">
                 <span style="color: #409EFF;cursor: pointer" @click.stop="Jump(row)">{{ row.ordNo }}
                 </span>
@@ -106,6 +109,7 @@ export default {
                 businesDateEnd: defaultDate3()[1],
                 bsType: "XS,TKXS",
                 isContain: 1,
+                whetherRebate: 0,
             },
             page: {
                 pageSize: 10,
@@ -125,7 +129,7 @@ export default {
                 // searchIndex: 2,
                 // highlightCurrentRow: true,
                 border: true,
-                searchMenuSpan: 6,
+                searchMenuSpan: 24,
                 addBtn: false,
                 showSummary: true,
                 summaryText: "合计",
@@ -326,6 +330,14 @@ export default {
                     search: true,
                     searchslot: true,
                     searchOrder: 10
+                }, {
+                    label: '返利利润',
+                    prop: 'whetherRebate',
+                    overHidden: true,
+                    hide: true,
+                    search: true,
+                    searchslot: true,
+                    searchOrder: 11
                 }]
             },
             bsTypeData: [],

+ 16 - 4
src/views/tirePartsMall/financialManagement/salesAnalysis/index.vue

@@ -23,8 +23,8 @@
             </template> -->
             <template slot="storageIdSearch">
                 <search-query :datalist="storageData" :selectValue="query.storageId" :clearable="true" :buttonIf="false"
-                    :forParameter="{ key: 'id', label: 'cname', value: 'id' }" placeholder="请选择仓库" @corpFocus="storageIdfun"
-                    @corpChange="corpChange($event, 'storageId')">
+                    :forParameter="{ key: 'id', label: 'cname', value: 'id' }" placeholder="请选择仓库"
+                    @corpFocus="storageIdfun" @corpChange="corpChange($event, 'storageId')">
                 </search-query>
             </template>
             <template slot="salerNameSearch">
@@ -33,6 +33,9 @@
                     @corpFocus="YWYgetListfun" @corpChange="corpChange($event, 'salerName')">
                 </search-query>
             </template>
+            <template slot="whetherRebateSearch">
+                <el-checkbox v-model="query.whetherRebate" :true-label="1" :false-label="0"></el-checkbox>
+            </template>
         </avue-crud>
     </basic-container>
 </template>
@@ -60,7 +63,8 @@ export default {
             query: {
                 businesDateStart: defaultDate3()[0],
                 businesDateEnd: defaultDate3()[1],
-                bsType: 2
+                bsType: 2,
+                whetherRebate:0
             },
             page: {
                 pageSize: 10,
@@ -76,7 +80,7 @@ export default {
                 menu: false,
                 height: "auto",
                 border: true,
-                searchMenuSpan: 24,
+                searchMenuSpan: 18,
                 addBtn: false,
                 showSummary: true,
                 summaryText: "合计",
@@ -232,6 +236,14 @@ export default {
                     label: '销售利润',
                     prop: 'salesProfit',
                     overHidde: true,
+                }, {
+                    label: '返利利润',
+                    prop: 'whetherRebate',
+                    overHidden: true,
+                    hide: true,
+                    search: true,
+                    searchslot: true,
+                    searchOrder: 7
                 }],
             },
             customerData: [], // 客户数据

+ 4 - 4
src/views/tirePartsMall/pointsMall/pointsGoods/detailsPage.vue

@@ -138,8 +138,8 @@ export default {
             storageVisible: false,
             isWhether: false,
             form: {
-                whether:'0',
-                whetherIntegral:'1'
+                whether: '0',
+                whetherIntegral: '1'
             },
             form2: {},
             form3: {},
@@ -548,11 +548,11 @@ export default {
             //   this.goodsTypeList = res.data.data;
             //   this.findObject(this.option2.column, "parentId").dicData = res.data.data;
             // });
-            getCorpType({ corpType: "SP",whetherIntegral:'1' }).then(res => {
+            getCorpType({ corpType: "SP", whetherIntegral: '1' }).then(res => {
                 console.log(res);
                 this.goodsTypeList = res.data.data;
             })
-            customerList({ corpType: "SP",whetherIntegral:'1' }).then(res => {
+            customerList({ corpType: "SP", whetherIntegral: '1' }).then(res => {
                 console.log('kk', res);
                 // this.goodsTypeList = res.data.data.records;
                 this.findObject(this.option2.column, "parentId").dicData = res.data.data.records;

+ 0 - 1
src/views/tirePartsMall/pointsMall/pointsGoods/index.vue

@@ -107,7 +107,6 @@ import { getList, remove, getCorpType, synchronization } from "@/api/tirePartsMa
 import { getToken } from "@/util/auth";
 // import goodsType from '@/components/goodsType/index'
 import corpType from './components/index'
-
 export default {
   name: "index",
   data() {

+ 3 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -623,7 +623,9 @@ export default {
             }).finally(() => {
               loading.close();
             });
-          })
+          }).catch(() => {
+            loading.close();
+          });
         } else {
           this.$message.error('请选择库管')
         }

+ 13 - 16
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -42,10 +42,9 @@
               @click="rowDelBox(row, index)">删除
             </el-button>
           </template>
-
           <template slot="goodsNum" slot-scope="{row}">
             <el-input-number v-if="row.$cellEdit && whetherFinancing != 1" v-model="row.goodsNum" size="small"
-              :controls="false" :precision="0" style="width: 100%" @change="calculator2(row)"/>
+              :controls="false" :precision="0" style="width: 100%" @change="calculator2(row)" />
             <span v-else>{{ row.goodsNum }}</span>
           </template>
           <template slot="sendNumFinancing" slot-scope="{row}">
@@ -71,21 +70,18 @@
             <span v-else>{{ row.dot }}</span>
           </template>
           <template slot="price" slot-scope="{row}">
-            <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false"
-              style="width: 100%" @change="calculator2(row)"/>
+            <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false" style="width: 100%"
+              @change="calculator2(row)" />
             <span v-else>{{ row.price }}</span>
           </template>
 
         </avue-crud>
       </trade-card>
-
       <containerTitle title="上传附件"></containerTitle>
       <c-upload v-loading="loadingBtn" typeUpload="LT" :disabled="isAddDisabled"
         deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
         :enumerationValue="35.1"></c-upload>
-
       <report-dialog :switchDialog="switchDialog" :reportId="form.id" @onClose="onClose()"></report-dialog>
-
       <dialogAssembly ref="dialogAssemblyRef" :form="form" @tableDataHandle="tableDataHandle">
       </dialogAssembly>
     </div>
@@ -735,20 +731,20 @@ export default {
       }
     },
     calculator(row) {
-      if(row.sendNumFinancing>row.inventoryFinancing){
-        this.$set(row,'sendNumFinancing','0')
+      if (row.sendNumFinancing > row.inventoryFinancing) {
+        this.$set(row, 'sendNumFinancing', '0')
         this.$message.error("融资数量不能大于参考库存融资");
       }
-      if(row.sendNumHave>row.inventoryHave){
-        this.$set(row,'sendNumHave','0')
+      if (row.sendNumHave > row.inventoryHave) {
+        this.$set(row, 'sendNumHave', '0')
         this.$message.error("自由数量不能大于参考库存自有");
       }
       row.goodsNum = Number(Number(row.sendNumFinancing) + Number(row.sendNumHave))
       row.subTotalMoney = row.goodsNum * row.price
     },
     calculator2(row) {
-      if(row.goodsNum>row.inventory){
-        this.$set(row,'goodsNum','0')
+      if (row.goodsNum > row.inventory) {
+        this.$set(row, 'goodsNum', '0')
         this.$message.error("调拨数量不能大于库存");
       }
       row.subTotalMoney = row.goodsNum * row.price
@@ -763,15 +759,15 @@ export default {
           price: item.price, // 单价
           goodsName: item.cname,
           goodsNum: item.goodsNum,
-          sendNumFinancing:this.whetherFinancing==1?item.goodsNum:0,
+          sendNumFinancing: this.whetherFinancing == 1 ? item.goodsNum : 0,
           sendNumHave: '0',
           brandName: item.brandName,
           brandId: item.brandId,
           goodsNo: item.code,
           propertyName: item.specificationAndModel,
           inventory: item.inventory,
-          inventoryHave:this.whetherFinancing==1?item.inventoryHave:0 ,
-          inventoryFinancing: this.whetherFinancing==1?item.inventoryFinancing:0,
+          inventoryHave: this.whetherFinancing == 1 ? item.inventoryHave : 0,
+          inventoryFinancing: this.whetherFinancing == 1 ? item.inventoryFinancing : 0,
           pattern: item.brandItem,
           goodsDescription: item.goodsDescription,
           dot: item.dot,
@@ -787,6 +783,7 @@ export default {
           goodsNumtype: false,
           // 价格
           pricetype: false,
+          $cellEdit: true
         }
         this.form.shipItemsList.push(obj)
       }

+ 1 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue

@@ -150,9 +150,9 @@ import {getCorpTypes} from "@/api/tirePartsMall/basicData/commodityInformation";
             },
             // 点击搜索触发
             goodsSearch(params, done) {
-                this.treeDeptId = ''
                 params = {
                     ...params,
+                    goodsTypeId:this.treeDeptId,
                     artsVision: this.form.belongToCorpId
                 }
 

+ 51 - 37
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -1058,33 +1058,39 @@ export default {
                     editDisplay: false,
                     addDisplay: false
                 },
-                // {
-                //     label: '返利后单价',
-                //     prop: 'rebatePrice',
-                //     overHidden: true,
-                //     width: 100,
-                //     disabled: true,
-                //     editDisplay: false,
-                //     addDisplay: false
-                // },
-                // {
-                //     label: '返利后成本价',
-                //     prop: 'rebateCostprie',
-                //     overHidden: true,
-                //     width: 100,
-                //     disabled: true,
-                //     editDisplay: false,
-                //     addDisplay: false
-                // },
-                // {
-                //     label: '返利后利润',
-                //     prop: 'rebateProfit',
-                //     overHidden: true,
-                //     width: 100,
-                //     disabled: true,
-                //     editDisplay: false,
-                //     addDisplay: false
-                // },
+                {
+                    label: '返利后单价',
+                    prop: 'rebatePrice',
+                    overHidden: true,
+                    width: 100,
+                    disabled: true,
+                    editDisplay: false,
+                    addDisplay: false,
+                    hide: false,
+                    showColumn: true
+                },
+                {
+                    label: '返利后成本价',
+                    prop: 'rebateCostprie',
+                    overHidden: true,
+                    width: 100,
+                    disabled: true,
+                    editDisplay: false,
+                    addDisplay: false,
+                    hide: false,
+                    showColumn: true
+                },
+                {
+                    label: '返利后利润',
+                    prop: 'rebateProfit',
+                    overHidden: true,
+                    width: 100,
+                    disabled: true,
+                    editDisplay: false,
+                    addDisplay: false,
+                    hide: false,
+                    showColumn: true
+                },
                 {
                     label: '退货数量',
                     prop: "returnsNumber",
@@ -1198,12 +1204,6 @@ export default {
         } else {
             this.reportName = '轮胎商城-销售订单'
         }
-        // console.log(this.$route);
-        //         if(this.$route.query.check.actId){
-
-        //             this.isExamineBtn = false
-        //         }
-
         getWorkDicts("tyre_express_company").then(res => {
             this.courierCompaniesList = res.data.data;
         })
@@ -1215,15 +1215,11 @@ export default {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
                     this.formContacts.inventory = res.data.data.inventory
-                    // this.formContacts.brandId = res.data.data.brandName
-                    // this.formContacts.brandName = res.data.data.brandId
-
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
                     this.formContacts.units = res.data.data.unit
                     this.formContacts.price = res.data.data.price
-                    //
                     this.formContacts.sharedCompanyId = res.data.data.sharedCompanyId
                     console.log(res.data.data.sharedCompanyId);
                     console.log(res.data.data.sharedCompanyName);
@@ -1265,9 +1261,15 @@ export default {
                 this.findObject(this.optionTwo.column, "explosionProof").hide = true
                 this.findObject(this.optionTwo.column, "originalFactory").hide = true
                 this.findObject(this.optionTwo.column, "selfRecovery").hide = true
+                this.findObject(this.optionContacts.column, "rebatePrice").hide = true
+                this.findObject(this.optionContacts.column, "rebateCostprie").hide = true
+                this.findObject(this.optionContacts.column, "rebateProfit").hide = true
                 this.findObject(this.optionTwo.column, "explosionProof").showColumn = false
                 this.findObject(this.optionTwo.column, "originalFactory").showColumn = false
                 this.findObject(this.optionTwo.column, "selfRecovery").showColumn = false
+                this.findObject(this.optionContacts.column, "rebatePrice").showColumn = true
+                this.findObject(this.optionContacts.column, "rebateCostprie").showColumn = true
+                this.findObject(this.optionContacts.column, "rebateProfit").showColumn = true
             }
         })
         this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
@@ -3001,6 +3003,12 @@ export default {
             isProcurement({ "param": "whether.model" }).then(res => {
                 if (res.data.data == 1) {
                     this.findObject(this.optionContacts.column, "pattern").label = '规格型号1'
+                    this.findObject(this.optionContacts.column, "rebatePrice").hide = true
+                    this.findObject(this.optionContacts.column, "rebateCostprie").hide = true
+                    this.findObject(this.optionContacts.column, "rebateProfit").hide = true
+                    this.findObject(this.optionContacts.column, "rebatePrice").showColumn = true
+                    this.findObject(this.optionContacts.column, "rebateCostprie").showColumn = true
+                    this.findObject(this.optionContacts.column, "rebateProfit").showColumn = true
                 }
             })
             if (inSave) {
@@ -3015,6 +3023,12 @@ export default {
             isProcurement({ "param": "whether.model" }).then(res => {
                 if (res.data.data == 1) {
                     this.findObject(this.optionContacts.column, "pattern").label = '规格型号1'
+                    this.findObject(this.optionContacts.column, "rebatePrice").hide = true
+                    this.findObject(this.optionContacts.column, "rebateCostprie").hide = true
+                    this.findObject(this.optionContacts.column, "rebateProfit").hide = true
+                    this.findObject(this.optionContacts.column, "rebatePrice").showColumn = true
+                    this.findObject(this.optionContacts.column, "rebateCostprie").showColumn = true
+                    this.findObject(this.optionContacts.column, "rebateProfit").showColumn = true
                 }
             })
             const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);

+ 5 - 5
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -44,16 +44,16 @@
                             <!--        </el-option>-->
                             <!--    </el-select>-->
                             <!--</template>-->
-                            <template slot="sendNum" slot-scope="{ row }">
+                            <!-- <template slot="sendNum" slot-scope="{ row }">
                                 <el-input-number v-if="row.$cellEdit" size="small" v-model="row.sendNum" :controls="false" :precision="numberDecimal" :min="0"
                                     style="width: 100%"></el-input-number>
                                 <span v-else>{{ row.sendNum }}</span>
-                            </template>
+                            </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <!-- <el-button :size="size" :disabled="disabled || isEdit" :type="type"
+                                <el-button :size="size" :disabled="disabled || isEdit" :type="type"
                                   :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">
                                   {{row.$cellEdit?'保存':'编辑'}}
-                              </el-button> -->
+                              </el-button>
                                 <el-button icon="el-icon-delete" :size="size"
                                     :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits" :type="type"
                                     @click="rowDelBox(row, index)">删除
@@ -330,7 +330,7 @@ export default {
                 editBtn: false, // 修改按钮
                 delBtn: false, //删除按钮
                 border: true,
-                menuWidth: 80,
+                menuWidth: 140,
                 stripe: true,
                 span: 8,
                 addRowBtn: false,