chenrui 2 vuotta sitten
vanhempi
commit
0f918db452

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1687168379154
+  "version": 1687938698998
 }

+ 38 - 10
src/views/productManagement/productInfoJg/list.vue

@@ -91,6 +91,21 @@
                   自定义车主价
                 </a-checkbox>
               </a-menu-item>
+              <a-menu-item>
+                <a-checkbox v-model="isCityPrice">
+                  市级价
+                </a-checkbox>
+              </a-menu-item>
+              <a-menu-item>
+                <a-checkbox v-model="isZdPrice">
+                  终端价
+                </a-checkbox>
+              </a-menu-item>
+              <a-menu-item>
+                <a-checkbox v-model="isCzPrice">
+                  车主价
+                </a-checkbox>
+              </a-menu-item>
             </a-menu>
           </a-dropdown>
           <a-divider type="vertical" style="margin:5px 0;"/>
@@ -204,8 +219,11 @@ export default {
         stockEmptyFlag: undefined
       },
       openGuideModal: false,
-      isTerminalPrice: false,
-      isCarOwnersPrice: false,
+      isTerminalPrice: true,
+      isCarOwnersPrice: true,
+      isCityPrice: true,
+      isZdPrice: true,
+      isCzPrice: true,
       openEditPriceModal: false, // 自定义报价弹窗
       iconShowFlag: false, // 列表配置图标显示
       disabled: false, //  查询、重置按钮是否可操作
@@ -246,8 +264,8 @@ export default {
         { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } }
       ]
       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: '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: 'currentStockQty', width: '7%', align: 'center', customRender: function (text) { return text || text == 0 ? text : '--' } },
@@ -258,10 +276,14 @@ export default {
       ]
       if (_this.currentDealerInfo.dealerLevel && _this.currentDealerInfo.dealerLevel == 'PROVINCE') { //  省级
         arr.push(
-          { 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: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
         )
-      } else if (_this.currentDealerInfo.dealerLevel && _this.currentDealerInfo.dealerLevel == 'CITY') { //  市级
+        if (_this.isCityPrice) {
+          arr.push(
+            { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+          )
+        }
+      } else if (_this.currentDealerInfo.dealerLevel && _this.currentDealerInfo.dealerLevel == 'CITY' && _this.isCityPrice) { //  市级
         arr.push(
           { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
         )
@@ -269,12 +291,18 @@ export default {
       if (_this.currentDealerInfo.isShowSpecialPrice && _this.currentDealerInfo.isShowSpecialPrice == '1') { //  是否展示特约价
         arr.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
+
+      if (_this.isZdPrice) {
+        arr.push({ title: '终端价', dataIndex: 'terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       if (_this.isTerminalPrice) {
-        cArr.splice(1, 0, { title: '自定义终端价', dataIndex: 'dealerProductPrice.terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '自定义终端价', dataIndex: 'dealerProductPrice.terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      if (_this.isCzPrice) {
+        arr.push({ title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (_this.isCarOwnersPrice) {
-        const pos = _this.isTerminalPrice ? 3 : 2
-        cArr.splice(pos, 0, { title: '自定义车主价', dataIndex: 'dealerProductPrice.carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '自定义车主价', dataIndex: 'dealerProductPrice.carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       arr = [...arr, ...cArr]
       return arr

+ 32 - 6
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -21,7 +21,10 @@
         <a-row :gutter="15">
           <a-col :span="16">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-              <selectCust ref="custList" :isValidateEnabled="true" @change="custChange" v-model="form.buyerSn"></selectCust>
+              <selectCust v-if="!isEdit" ref="custList" :isValidateEnabled="true" @change="custChange" v-model="form.buyerSn"></selectCust>
+              <span v-else>
+                {{ form&&form.buyerNameCurrent?form.buyerName?form.buyerName==form.buyerNameCurrent?form.buyerNameCurrent:form.buyerNameCurrent+'('+form.buyerName+')':form.buyerNameCurrent:'--' }}
+              </span>
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="16">
@@ -106,13 +109,25 @@
         <a-row :gutter="15">
           <a-col :span="8">
             <a-form-model-item label="是否抓单" prop="grabFlag">
-              <v-select code="FLAG" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
+              <v-select code="FLAG" :disabled="isEdit" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
             </a-form-model-item>
           </a-col>
           <a-col :span="8">
             <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
           </a-col>
         </a-row>
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="{ span: 2 }" :wrapper-col="{ span: 14 }">
+               <a-textarea
+                    v-model="form.remarks"
+                    :maxLength="100"
+                    placeholder="请输入备注(最多100个字符)"
+                    :auto-size="{ minRows: 2, maxRows: 6 }"
+                  />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
           <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
           <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
@@ -249,7 +264,9 @@ export default {
         }
       } else {
         this.$refs.ruleForm.resetFields()
-        this.$refs.custList.resetForm()
+        if(!this.isEdit){
+          this.$refs.custList.resetForm()
+        }
       }
     },
     // 编辑客户信息
@@ -257,10 +274,19 @@ export default {
       console.log(data)
       this.title = '编辑客户信息'
       this.isEdit = true
-      if (data.provinceSn) { this.getArea('city', data.provinceSn) }
-      if (data.citySn) { this.getArea('district', data.citySn) }
       this.form = Object.assign(this.form, data)
+      this.form.buyerName = data.buyerNameCurrent || data.buyerName
       this.buyerSnBak = this.form.buyerSn
+      if(data.buyerInfo){
+        this.form.contactTel = data.buyerInfo.contactTel
+        this.form.contactMobile = data.buyerInfo.contactMobile
+        this.form.consigneeName = data.buyerInfo.contactName
+        this.form.provinceSn = data.buyerInfo.provinceSn
+        this.form.citySn = data.buyerInfo.citySn
+        this.form.countySn = data.buyerInfo.countySn
+        if (data.buyerInfo.provinceSn) { this.getArea('city', data.buyerInfo.provinceSn) }
+        if (data.buyerInfo.citySn) { this.getArea('district', data.buyerInfo.citySn) }
+      }
     },
     //  获取详情
     getDetail () {
@@ -354,7 +380,7 @@ export default {
     cancel () {
       this.opened = false
       this.$refs.ruleForm.resetFields()
-      this.$refs.custList.resetForm()
+      this.$refs.custList && this.$refs.custList.resetForm()
       this.$emit('cancel')
     },
     // 获取城市列表

+ 44 - 4
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -5,13 +5,48 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerNameCurrent==ordeDetail.buyerName?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</span>
+          <span style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">退货单号:{{ ordeDetail&&ordeDetail.salesReturnNo||'--' }}</span>
+          <a-button type="primary" ghost @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
+            基础信息
+            <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
+          </a-button>
+          <a-button
+            type="link"
+            size="small"
+            @click="handleEditCustom"
+            style="margin-left:10px"
+            class="button-info"
+            key="0"> <a-icon type="edit"></a-icon> 编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesReturnPrint')">
           <Print :disabled="chooseLoadData.length==0" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" v-show="isShowBisiceInfo" class="pages-wrap">
+         <a-collapse :activeKey="['1']">
+           <a-collapse-panel key="1" header="基础信息">
+             <a-descriptions size="small" :column="3">
+               <a-descriptions-item label="客户名称">{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerName==ordeDetail.buyerNameCurrent?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</a-descriptions-item>
+               <a-descriptions-item label="客户地址">
+                 <div v-if="ordeDetail&&(ordeDetail.provinceName || ordeDetail.cityName || ordeDetail.countyName || ordeDetail.customerAddr)">
+                   {{ ordeDetail&&ordeDetail.provinceName || '' }}
+                   {{ ordeDetail&&ordeDetail.cityName || '' }}
+                   {{ ordeDetail&&ordeDetail.countyName || '' }}
+                   {{ ordeDetail&&ordeDetail.customerAddr || '' }}
+                 </div>
+                 <span v-else>--</span>
+               </a-descriptions-item>
+               <a-descriptions-item label="联系电话">{{ ordeDetail&&ordeDetail.contactTel || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="退货单号">{{ ordeDetail&&ordeDetail.salesReturnNo || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="业务状态">{{ ordeDetail&&ordeDetail.stateDictValue || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="是否抓单">{{ ordeDetail&&ordeDetail.grabFlag==1?'抓单':'不抓单' }}</a-descriptions-item>
+               <a-descriptions-item label="备注">{{ ordeDetail&&ordeDetail.remarks || '--' }}</a-descriptions-item>
+             </a-descriptions>
+           </a-collapse-panel>
+         </a-collapse>
+      </a-card>
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- 查询配件列表 -->
         <queryPart
@@ -174,7 +209,7 @@
     </a-spin>
     <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
-    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+    <choose-custom-modal ref="editCustomModal" :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
   </div>
 </template>
 
@@ -266,7 +301,8 @@ export default {
           return data
         })
       },
-      printerType: 'NEEDLE' //  打印机类型
+      printerType: 'NEEDLE' ,//  打印机类型
+      isShowBisiceInfo: false,
     }
   },
   methods: {
@@ -275,9 +311,13 @@ export default {
       this.$router.push({ path: '/salesManagement/salesReturn/list' })
     },
     // 选择客户成功
-    chooseCustomOk (data) {},
+    chooseCustomOk (data) {
+      this.openModal = false
+      this.getOrderDetail()
+    },
     handleEditCustom () {
       this.openModal = true
+      this.$refs.editCustomModal.editCust(this.ordeDetail)
     },
     // 已选产品  blur
     onCellBlur (val, record, type) {

+ 44 - 4
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -5,13 +5,48 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="salesReturnGrabEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerNameCurrent==ordeDetail.buyerName?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</span>
+          <span style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">退货单号:{{ ordeDetail&&ordeDetail.salesReturnNo||'--' }}</span>
+          <a-button type="primary" ghost @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
+            基础信息
+            <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
+          </a-button>
+          <a-button
+            type="link"
+            size="small"
+            @click="handleEditCustom"
+            style="margin-left:10px"
+            class="button-info"
+            key="0"> <a-icon type="edit"></a-icon> 编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesReturnPrint')">
           <Print :disabled="chooseLoadData.length==0" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" v-show="isShowBisiceInfo" class="pages-wrap">
+         <a-collapse :activeKey="['1']">
+           <a-collapse-panel key="1" header="基础信息">
+             <a-descriptions size="small" :column="3">
+               <a-descriptions-item label="客户名称">{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerName==ordeDetail.buyerNameCurrent?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</a-descriptions-item>
+               <a-descriptions-item label="客户地址">
+                 <div v-if="ordeDetail&&(ordeDetail.provinceName || ordeDetail.cityName || ordeDetail.countyName || ordeDetail.customerAddr)">
+                   {{ ordeDetail&&ordeDetail.provinceName || '' }}
+                   {{ ordeDetail&&ordeDetail.cityName || '' }}
+                   {{ ordeDetail&&ordeDetail.countyName || '' }}
+                   {{ ordeDetail&&ordeDetail.customerAddr || '' }}
+                 </div>
+                 <span v-else>--</span>
+               </a-descriptions-item>
+               <a-descriptions-item label="联系电话">{{ ordeDetail&&ordeDetail.contactTel || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="退货单号">{{ ordeDetail&&ordeDetail.salesReturnNo || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="业务状态">{{ ordeDetail&&ordeDetail.stateDictValue || '--' }}</a-descriptions-item>
+               <a-descriptions-item label="是否抓单">{{ ordeDetail&&ordeDetail.grabFlag==1?'抓单':'不抓单' }}</a-descriptions-item>
+               <a-descriptions-item label="备注">{{ ordeDetail&&ordeDetail.remarks || '--' }}</a-descriptions-item>
+             </a-descriptions>
+           </a-collapse-panel>
+         </a-collapse>
+      </a-card>
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- 查询配件列表 -->
         <queryPart ref="queryPart" grabFlag="1" :newLoading="isInster" :warehouseCascadeData="warehouseCascadeData" @add="saveProduct"></queryPart>
@@ -161,7 +196,7 @@
     </a-spin>
     <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
-    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+    <choose-custom-modal ref="editCustomModal" :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
   </div>
 </template>
 
@@ -254,7 +289,8 @@ export default {
           return data
         })
       },
-      printerType: 'NEEDLE' //  打印机类型
+      printerType: 'NEEDLE' ,//  打印机类型
+      isShowBisiceInfo: false,
     }
   },
   methods: {
@@ -263,9 +299,13 @@ export default {
       this.$router.push({ path: '/salesManagement/salesReturn/list' })
     },
     // 选择客户成功
-    chooseCustomOk (data) {},
+    chooseCustomOk (data) {
+      this.openModal = false
+      this.getOrderDetail()
+    },
     handleEditCustom () {
       this.openModal = true
+      this.$refs.editCustomModal.editCust(this.ordeDetail)
     },
     // 已选产品  blur
     onCellBlur (val, record, type) {