Forráskód Böngészése

销售管理添加轮胎判断

caojunjie 2 éve
szülő
commit
1ad9c59a17

+ 4 - 0
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -737,6 +737,7 @@ export default {
     //   })
     // }
     this.key++
+      console.log(this.onLoad.id,this.detailData.id,740)
     if (this.onLoad.id && this.detailData.id) {
       this.refresh(this.onLoad.id,true)
     }else if (this.onLoad.id){
@@ -1099,6 +1100,7 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+      // 获取详情信息
     refresh(id,type) {
       const loading = this.$loading({
         lock: true,
@@ -1108,7 +1110,9 @@ export default {
       });
       detail({id: id}).then(res => {
         this.form = res.data.data
+          // 箱信息数据
         this.dataList = res.data.data.tradingBoxItemsList
+          // 费用信息数据
         this.dataListTwo = res.data.data.tradingBoxFeesList
         this.tradingBoxFilesList = res.data.data.tradingBoxFilesList
         delete this.form.tradingBoxItemsList

+ 4 - 6
src/views/tirePartsMall/basicData/listingManagement/commodity.json

@@ -73,10 +73,10 @@
         "overHidden": true,
         "props":{
           "res":"data.records",
-          "label":"parentName",
-          "value":"parentId"
+          "label":"cname",
+          "value":"id"
         },
-        "dicUrl":"/api/blade-sales-part/goodsType/page?corpType=SP",
+        "dicUrl":"/api/blade-sales-part/goodsType/page?corpType=SP&parentId=0",
         "rules": [{
           "required": true,
           "message": " ",
@@ -89,14 +89,13 @@
         "search": false,
         "overHidden": true
       },
-     
+
       {
         "label": "花纹",
         "prop": "brandItem",
         "slot": true,
         "overHidden": true
       },
-   
       {
         "label": "售价1",
         "prop": "priceOne",
@@ -137,4 +136,3 @@
       }
     ]
   }
-  

+ 56 - 3
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -39,7 +39,7 @@
             </template>
 
             <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-              <el-button type="primary" icon="el-icon-plus" size="small" @click="commoditySelection">导入库存
+              <el-button type="primary" icon="el-icon-plus" size="small" @click="commoditySelection">选择产品
               </el-button>
               <el-button class="el-icon-bottom" type="warning" size="small" @click="excelBox = true">
                 导入
@@ -55,10 +55,19 @@
         </el-col>
       </el-row>
     </basic-container>
-    <el-dialog title="导入库存" v-if="dialogVisibles" append-to-body class="el-dialogDeep" :visible.async="dialogVisibles" width="80%"
+    <el-dialog title="选择产品" v-if="dialogVisibles" append-to-body class="el-dialogDeep" :visible.async="dialogVisibles" width="80%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="dialogVisibles = false">
       <el-row :style="{ height: rowHeight }">
-        <el-col :span="24">
+          <el-col :span="5" style="height: 100%;overflow-y: auto">
+              <div>
+                  <el-scrollbar>
+                      <basic-container>
+                          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
+                      </basic-container>
+                  </el-scrollbar>
+              </div>
+          </el-col>
+        <el-col :span="19">
           <!-- <basic-container> -->
             <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="cruds"
               @refresh-change="refreshChangeCost" @selection-change="selectionChangeCost" @search-change="goodsSearchCost"
@@ -228,6 +237,7 @@ export default {
       },
       excelBox: false,
       corpTypeVisible: false,
+        // 左侧搜索
       treeData: [],
       loading: false,
       search: {},
@@ -373,7 +383,47 @@ export default {
           showColumn: false,
           overHidden: true,
           span: 24,
+        },{
+           label: "防爆",
+           prop: "explosionProof",
+                search: true,
+           span: 8,
+           type: 'select',
+           dicData: [{
+              label: '否',
+              value: 0
+           }, {
+              label: '是',
+              value: 1
+           }],
         }, {
+                label: "原厂",
+                prop: "originalFactory",
+                search: true,
+                span: 8,
+                type: 'select',
+                dicData: [{
+                    label: '否',
+                    value: "0"
+                }, {
+                    label: '是',
+                    value: "1"
+                }],
+            },
+            {
+                label: "自修补",
+                prop: "selfRecovery",
+                search: true,
+                span: 8,
+                type: 'select',
+                dicData: [{
+                    label: '否',
+                    value: "0"
+                }, {
+                    label: '是',
+                    value: "1"
+                }],
+            }, {
           label: "轮胎详情",
           prop: "detailsText",
           hide: true,
@@ -456,6 +506,9 @@ export default {
   },
   //新增
   commoditySelection() {
+        delete this.page.brandId
+      this.goodsListShow = []
+
     this.dialogVisibles = !this.dialogVisibles
     this.tableData = []
     this.goodsListSave = [];

+ 40 - 0
src/views/tirePartsMall/basicData/shareListing/index.vue

@@ -261,7 +261,47 @@ export default {
             value: 'id'
           },
           dicUrl: '/api/blade-system/dept/top-list'
+        },{
+            label: "防爆",
+            prop: "explosionProof",
+            search: true,
+            span: 8,
+            type: 'select',
+            dicData: [{
+                label: '否',
+                value: 0
+            }, {
+                label: '是',
+                value: 1
+            }],
         }, {
+            label: "原厂",
+            prop: "originalFactory",
+            search: true,
+            span: 8,
+            type: 'select',
+            dicData: [{
+                label: '否',
+                value: "0"
+            }, {
+                label: '是',
+                value: "1"
+            }],
+        },
+            {
+                label: "自修补",
+                prop: "selfRecovery",
+                search: true,
+                span: 8,
+                type: 'select',
+                dicData: [{
+                    label: '否',
+                    value: "0"
+                }, {
+                    label: '是',
+                    value: "1"
+                }],
+            }, {
           label: "详情附件",
           prop: "filesList",
           hide: true,

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

@@ -8,9 +8,9 @@
             </div>
             <div class="add-customer-btn">
                 <el-button class="el-button&#45;&#45;small-yh" :disabled="isEditButton" style="margin-left: 6px;"
-                    type="primary" size="small" v-if="editButton && isSaveBtn" @click="confirmEditing">编 辑
+                    type="primary" size="small" v-if="editButton" @click="confirmEditing">编 辑
                 </el-button>
-                <el-button v-else class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
+                <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     :disabled="isSaveBtn" @click="editCustomer">保 存
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
@@ -738,7 +738,15 @@ export default {
                     },
                     dicUrl: "/api/blade-sales-part/stockDesc/dotList",
                     overHidden: true,
-                }, {
+                },{
+                        label: '小计',
+                        prop: 'subTotalMoney',
+                        overHidden: true,
+                        width: 100,
+                        disabled: true,
+                        editDisplay: false,
+                        addDisplay: false
+                    }, {
                     label: '轮胎编码',
                     prop: 'goodsNo',
                     overHidden: true,
@@ -801,15 +809,7 @@ export default {
                 //     overHidden: true,
                 //     width: 100
                 // },
-                {
-                    label: '小计',
-                    prop: 'subTotalMoney',
-                    overHidden: true,
-                    width: 100,
-                    disabled: true,
-                    editDisplay: false,
-                    addDisplay: false
-                },
+
                 // {
                 //     label: '返利',
                 //     prop: 'thisAmount',
@@ -1717,7 +1717,7 @@ export default {
                                                 this.isDisabled = true
                                                 // this.findObject(this.optionForm,'disabled') = true
                                                 // this.findObject(this.optionContactsBack,'disabled') = true
-                                                this.$message.success("生成库任务成功");
+                                                this.$message.success("生成库任务成功");
                                                 this.isApplySettlement = false
                                                 loading.close();
 
@@ -1763,7 +1763,7 @@ export default {
                                 this.buttonText = '生成任务';
                                 // 将按钮颜色还原为success
                                 this.buttonColor = 'success';
-                                this.$message.success("撤销库成功");
+                                this.$message.success("撤销库成功");
                                 this.refresh(res.data.data.id)
                                 this.isApplySettlement = false
                                 loading.close();
@@ -1800,7 +1800,6 @@ export default {
         },
         //修改提交触发
         editCustomer() {
-            this.mingxibaocun = true
             this.$refs["form"].validate((valid, done) => {
                 done();
                 let picihao = false
@@ -1812,13 +1811,14 @@ export default {
                         }else {
                             if(this.form.orderItemsList[i].whether == '1'){
                                 if(this.form.orderItemsList[i].dot){}else {
-                                    this.$message.success(`采购明细序号${i+1}的批次号不能为空`);
+                                    this.$message.warning(`采购明细序号${Number(i)+1}的批次号不能为空`);
                                     picihao = true
                                 }
                             }else {
                             }
                         }
                     }
+                    this.mingxibaocun = true
                     if (picihao) {
                         return
                     }

+ 30 - 1
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -84,6 +84,9 @@
                             <!--        </el-select>-->
                             <!--    </div>-->
                             <!--</template>-->
+                            <template slot="goodsId" slot-scope="{ row }">
+                                {{ row.goodsName}}
+                            </template>
 
                             <template slot="goodsNum" slot-scope="{ row }">
                                 <el-input v-if="!mingxibaocun" size="small" v-model="row.goodsNum" style="width: 100%"></el-input>
@@ -94,12 +97,13 @@
                                 <span v-else>{{ row.price }}</span>
                             </template>
                             <template slot="dot" slot-scope="{ row }">
-                                <el-select v-if="!mingxibaocun && row.whether=='1'" v-model="row.dot" allow-create filterable default-first-option >
+                                <el-select v-if="!mingxibaocun && row.whether=='1'" v-model="row.dot" allow-create filterable default-first-option @focus="picihaolistfun(row.goodsId)">
                                     <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
                                                :value="item.dot"></el-option>
                                 </el-select>
                                 <span v-else>{{ row.dot }}</span>
                             </template>
+                            <template slot="subTotalMoney" slot-scope="{ row }">{{row.goodsNum * row.price}}</template>
 
                             <template slot="remarks" slot-scope="{ row }">
                                 <el-input v-if="!mingxibaocun" size="small" v-model="row.remarks" style="width: 100%"></el-input>
@@ -1224,6 +1228,8 @@ export default {
                     dot:item.dot,
                     whether:item.whether,
                     units:item.unit,
+                    // 小计
+                    subTotalMoney:item.goodsNum * item.price,
                     // 备注
                     remarks:item.remarks,
                     // 批次号的状态
@@ -1687,13 +1693,36 @@ export default {
         editCustomer() {
             this.$refs["form"].validate((valid, done) => {
                 done();
+                let picihao = false
                 if (valid) {
+                    for(let i in this.form.orderItemsList) {
+                        console.log(this.form.orderItemsList[i],1800)
+                        this.form.orderItemsList[i].subTotalMoney = this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price
+                        if (this.form.orderItemsList[i].pid) {
+                        }else {
+                            if(this.form.orderItemsList[i].whether == '1'){
+                                if(this.form.orderItemsList[i].dot){}else {
+                                    this.$message.warning(`销售明细序号${Number(i)+1}的批次号不能为空`);
+                                    picihao = true
+                                }
+                            }else {
+                            }
+                        }
+                    }
+                    this.mingxibaocun = true
+                    if (picihao) {
+                        return
+                    }
+
+
                     const loading = this.$loading({
                         lock: true,
                         text: '加载中',
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                     });
+
+
                     // this.form.orderItemsList.forEach(its => {
                     //     console.log(its.goodsId);
                     //     console.log(its.goodsName);