소스 검색

采购管理->上次缺货

chenrui 2 년 전
부모
커밋
a93da4aaba

+ 20 - 7
src/views/productManagement/newProduct/detail.vue

@@ -26,26 +26,39 @@
             <a-descriptions-item label="省级经销商:" :span="2">
             <a-descriptions-item label="省级经销商:" :span="2">
               <a-row :gutter="16">
               <a-row :gutter="16">
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  市场建议价:--
+                  市场价:--
                 </a-col>
                 </a-col>
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  特约建议价:--
+                  特约价:--
                 </a-col>
                 </a-col>
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  终端建议价:--
+                  终端价:--
                 </a-col>
                 </a-col>
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  车主建议价:--
+                  车主价:--
                 </a-col>
                 </a-col>
               </a-row>
               </a-row>
             </a-descriptions-item>
             </a-descriptions-item>
-            <a-descriptions-item label="市级经销商和特约经销商:" :span="2">
+            <a-descriptions-item label="市级经销商:" :span="2">
               <a-row :gutter="16">
               <a-row :gutter="16">
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  终端建议价:--
+                  特约价:--
                 </a-col>
                 </a-col>
                 <a-col class="gutter-row" :span="6">
                 <a-col class="gutter-row" :span="6">
-                  车主建议价:--
+                  终端价:--
+                </a-col>
+                <a-col class="gutter-row" :span="6">
+                  车主价:--
+                </a-col>
+              </a-row>
+            </a-descriptions-item>
+            <a-descriptions-item label="特约经销商:" :span="2">
+              <a-row :gutter="16">
+                <a-col class="gutter-row" :span="6">
+                  终端价:--
+                </a-col>
+                <a-col class="gutter-row" :span="6">
+                  车主价:--
                 </a-col>
                 </a-col>
               </a-row>
               </a-row>
             </a-descriptions-item>
             </a-descriptions-item>

+ 6 - 0
src/views/productManagement/productInfoJg/editPriceModal.vue

@@ -19,6 +19,12 @@
           :label-col="formItemLayout.labelCol"
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
         >
+          <a-form-model-item label="产品编码" prop="terminalPrice">
+            <div>{{ form.terminalPrice }}</div>
+          </a-form-model-item>
+          <a-form-model-item label="产品名称" prop="terminalPrice">
+            <div>{{ form.terminalPrice }}</div>
+          </a-form-model-item>
           <a-form-model-item label="终端建议价" prop="terminalPrice">
           <a-form-model-item label="终端建议价" prop="terminalPrice">
             <div>{{ form.terminalPrice }}</div>
             <div>{{ form.terminalPrice }}</div>
           </a-form-model-item>
           </a-form-model-item>

+ 36 - 13
src/views/productManagement/productInfoJg/list.vue

@@ -63,6 +63,14 @@
         </a-col>
         </a-col>
         <a-col class="gutter-row" :span="12">
         <a-col class="gutter-row" :span="12">
           <div class="setTableList">
           <div class="setTableList">
+            <a-checkbox v-modal="isTerminalPrice" @change="changeTerminalPrice">
+              自定义终端价
+            </a-checkbox>
+            <a-checkbox v-modal="isCarOwnersPrice" @change="changeCarOwnersPrice">
+              自定义车主价
+            </a-checkbox>
+          </div>
+          <!-- <div class="setTableList">
             <span @click="iconShowFlag=!iconShowFlag">列表显示配置</span>
             <span @click="iconShowFlag=!iconShowFlag">列表显示配置</span>
             <a-icon :type="iconShowFlag?'up':'down'" :style="{ color: '#d5d5d5' }" @click="iconShowFlag=!iconShowFlag"/>
             <a-icon :type="iconShowFlag?'up':'down'" :style="{ color: '#d5d5d5' }" @click="iconShowFlag=!iconShowFlag"/>
             <div class="setTableList-box" v-show="iconShowFlag">
             <div class="setTableList-box" v-show="iconShowFlag">
@@ -92,7 +100,7 @@
                 </a-checkbox></div>
                 </a-checkbox></div>
               </a-checkbox-group>
               </a-checkbox-group>
             </div>
             </div>
-          </div>
+          </div> -->
         </a-col>
         </a-col>
       </a-row>
       </a-row>
     </div>
     </div>
@@ -186,13 +194,14 @@ export default {
         onlineFalg: '',
         onlineFalg: '',
         enabledFlag: '1'
         enabledFlag: '1'
       },
       },
+      isTerminalPrice: false,
+      isCarOwnersPrice: false,
       openEditPriceModal: false, // 自定义报价弹窗
       openEditPriceModal: false, // 自定义报价弹窗
       iconShowFlag: false, // 列表配置图标显示
       iconShowFlag: false, // 列表配置图标显示
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       exportLoading: false, // 导出loading
       dateFormat: 'YYYY-MM-DD',
       dateFormat: 'YYYY-MM-DD',
       columns: [],
       columns: [],
-      chooseShowList: ['A', 'B', 'C', 'D', 'E'],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -240,9 +249,6 @@ export default {
         })
         })
       }
       }
     },
     },
-    onChangeList (checkedValues) {
-      this.chooseShowList = checkedValues
-    },
     //  详情
     //  详情
     handleDetail (row) {
     handleDetail (row) {
       this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
       this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
@@ -278,10 +284,10 @@ export default {
         { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } }
         { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } }
       ]
       ]
       const cArr = [
       const cArr = [
-        { title: '终端建议价', dataIndex: 'terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '车主建议价', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '自定义终端价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '自定义车主价', dataIndex: 'price2', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        // { title: '自定义终端价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        // { title: '自定义车主价', dataIndex: 'price2', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
         { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
@@ -291,20 +297,36 @@ export default {
           if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { //  省级
           if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { //  省级
             this.columns.push(
             this.columns.push(
               { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
               { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-              { title: '市级建议价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
             )
             )
           } else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { //  市级
           } else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { //  市级
             this.columns.push(
             this.columns.push(
-              { title: '市级建议价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
             )
             )
           }
           }
           if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { //  是否展示特约价
           if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { //  是否展示特约价
-            this.columns.push({ title: '特约建议价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+            this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          }
+          if (_this.terminalPrice) {
+            cArr.splice(1, 0, { title: '自定义终端价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          }
+          if (_this.isCarOwnersPrice) {
+            const pos = _this.terminalPrice ? 3 : 2
+            cArr.splice(pos, 0, { title: '自定义车主价', dataIndex: 'price2', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
           }
           this.columns = [...this.columns, ...cArr]
           this.columns = [...this.columns, ...cArr]
         }
         }
       })
       })
     },
     },
+    // 显示自定义终端价
+    changeTerminalPrice (e) {
+      this.terminalPrice = e.target.checked
+      this.getColumns()
+    },
+    changeCarOwnersPrice (e) {
+      this.isCarOwnersPrice = e.target.checked
+      this.getColumns()
+    },
     filterOption (input, option) {
     filterOption (input, option) {
       return (
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -400,6 +422,7 @@ export default {
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
       this.setTableH()
     }
     }
+
   },
   },
   mounted () {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
@@ -422,7 +445,7 @@ export default {
 <style lang="less" scoped>
 <style lang="less" scoped>
 .setTableList{
 .setTableList{
   text-align: right;
   text-align: right;
-  position: relative;
+  // position: relative;
   span{
   span{
     margin-right: 10px;
     margin-right: 10px;
     color:#56a2fb;
     color:#56a2fb;

+ 20 - 16
src/views/purchasingManagement/purchaseOrder/outStockModal.vue

@@ -16,12 +16,12 @@
               <a-row :gutter="15">
               <a-row :gutter="15">
                 <a-col :md="8" :sm="24">
                 <a-col :md="8" :sm="24">
                   <a-form-item label="产品编码">
                   <a-form-item label="产品编码">
-                    <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                    <a-input id="productInfoList-code" v-model.trim="queryParam.dealerProductEntity.code" allowClear placeholder="请输入产品编码"/>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="8" :sm="24">
                 <a-col :md="8" :sm="24">
                   <a-form-item label="产品名称">
                   <a-form-item label="产品名称">
-                    <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                    <a-input id="productInfoList-name" v-model.trim="queryParam.dealerProductEntity.name" allowClear placeholder="请输入产品名称"/>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="8" :sm="24">
                 <a-col :md="8" :sm="24">
@@ -31,7 +31,7 @@
                 </a-col>
                 </a-col>
                 <a-col :md="8" :sm="24">
                 <a-col :md="8" :sm="24">
                   <a-form-item label="产品品牌">
                   <a-form-item label="产品品牌">
-                    <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+                    <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.dealerProductEntity.productBrandSn"></ProductBrand>
                     </a-select>
                     </a-select>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
@@ -42,7 +42,7 @@
               </a-row>
               </a-row>
             </a-form>
             </a-form>
           </div>
           </div>
-          <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
+          <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys?rowSelectionInfo.selectedRowKeys.length:0 }}个</p>
           <!-- 列表 -->
           <!-- 列表 -->
           <s-table
           <s-table
             class="sTable"
             class="sTable"
@@ -134,28 +134,33 @@ export default {
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false
+          const purchaseBillNo = data && data.list.length > 0 ? data.list[0].purchaseBillNo : '--'
+          this.title = '上次采购缺货产品明细(采购单号:' + purchaseBillNo + ')'
           return data
           return data
         })
         })
       },
       },
       spinning: false,
       spinning: false,
       rowSelectionInfo: null,
       rowSelectionInfo: null,
       productType: [],
       productType: [],
+      dataList: [],
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        code: '', //  产品编码
-        name: '', //  产品名称
-        productBrandSn: undefined, //  产品品牌
-        productTypeSn1: '', //  产品一级分类
-        productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        dealerProductEntity: {
+          code: '', //  产品编码
+          name: '', //  产品名称
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '' //  产品三级分类
+        }
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
     //  产品分类  change
     //  产品分类  change
     changeProductType (val, opt) {
     changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+      this.queryParam.dealerProductEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.dealerProductEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.dealerProductEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
     // 表格选中项
     // 表格选中项
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
@@ -234,7 +239,7 @@ export default {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     resetSearchForm () {
     resetSearchForm () {
-      this.queryParam = {
+      const info = {
         productBrandSn: undefined,
         productBrandSn: undefined,
         code: '', //  产品编码
         code: '', //  产品编码
         name: '', //  产品名称
         name: '', //  产品名称
@@ -242,6 +247,7 @@ export default {
         productTypeSn2: '', //  产品二级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '' //  产品三级分类
         productTypeSn3: '' //  产品三级分类
       }
       }
+      Object.assign(this.queryParam.dealerProductEntity, info)
       this.productType = []
       this.productType = []
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     }
     }
@@ -256,8 +262,6 @@ export default {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
         this.$refs.table.clearSelected() // 清空表格选中项
         this.$refs.table.clearSelected() // 清空表格选中项
-      } else {
-        this.title = '上次采购缺货产品明细(采购单号:' + this.paramsData.purchaseBillNo + ')'
       }
       }
     }
     }
   }
   }