lilei il y a 2 ans
Parent
commit
3f01a832a6

+ 4 - 4
src/views/allocationManagement/transfersPrint/list.vue

@@ -73,8 +73,8 @@
                   <a-row>
                     <a-form-item label="地区">
                       <a-col span="24">
-                        <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                          <Area id="allocateBillList-dealerProvinceSn" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
+                        <a-form-item style="margin: 0;">
+                          <Area id="allocateBillList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                         </a-form-item>
                       </a-col>
                     </a-form-item>
@@ -185,7 +185,7 @@ export default {
         checkStatus: undefined,
         printState: 'NO_PRINT',
         subareaSn: undefined,
-        dealerProvinceSn: undefined
+        shippingAddrProvinceSn: undefined
       },
       currentTab: 2,
       disabled: false, //  查询、重置按钮是否可操作
@@ -269,7 +269,7 @@ export default {
       this.queryParam.receiverName = ''
       this.queryParam.receiverSn = undefined
       this.queryParam.subareaSn = undefined
-      this.queryParam.dealerProvinceSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.receiverSn.resetForm()
       this.queryParam.printState = this.currentTab == 2 ? 'NO_PRINT' : undefined
       this.$refs.table.refresh(true)

+ 96 - 0
src/views/common/returnReason.js

@@ -0,0 +1,96 @@
+const ReturnReason = {
+  template: `
+       <a-input-group compact :id="id">
+        <a-input style="width: 75%" allowClear @change="handleChange" :placeholder="placeholder" :value="defaultVal"/>
+        <a-select
+          style="width: 25%"
+          @change="changeSel"
+          :dropdownMatchSelectWidth="false"
+          placeholder="选择"
+          option-filter-prop="children"
+          :filter-option="filterOption">
+          <a-select-option v-for="item in list" :key="item" :value="item">
+          {{ item }}
+          </a-select-option>
+        </a-select>
+      </a-input-group>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请输入退货原因'
+    },
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: [
+        '漏油或者不上油',
+        '外观不良:脏污、破损、脱胶、变形等',
+        '尺寸问题',
+        '泄压',
+        '无法安装',
+        '无法或不便安装',
+        '抖动或跳动',
+        '噪音',
+        '刮雨不干净',
+        '胶条断裂、脱落',
+        '喇叭无声',
+        '声音嘶哑或者变音',
+        '浸水',
+        '伤盘',
+        '摩擦块掉渣,脱落或有残渣',
+        '制动不足,刹车不灵敏',
+        '不耐磨',
+        '冒烟',
+        '缺少感应线',
+        '尺寸不标准',
+        '不点火,间歇式失火',
+        '漏电',
+        '击穿',
+        '烧蚀',
+        '包装型号不符',
+        '整体不亮/部分能亮',
+        '灯珠脱落',
+        '漏电短路',
+        '包装型号不符/包装破损',
+        '召回'
+        ]
+    };
+  },
+  mounted() {
+  },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue
+    },
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    changeSel(value){
+      this.defaultVal = value;
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+    handleChange(e) {
+      const value = e.target.value
+      this.defaultVal = value;
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+  },
+};
+
+export default ReturnReason

+ 4 - 3
src/views/salesReturnManagement/billOfLading/list.vue

@@ -207,10 +207,11 @@ export default {
         { title: '关联销退单', dataIndex: 'salesReturnNum', scopedSlots: { customRender: 'salesReturnNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '主题', dataIndex: 'theme', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '物流公司', dataIndex: 'logisticsCompany', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '物流点', dataIndex: 'logisticsPoint', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '发货方', dataIndex: 'dealerEntity.dealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '物流公司', dataIndex: 'logisticsCompany', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '物流点', dataIndex: 'logisticsPoint', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货方', dataIndex: 'dealerEntity.dealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货人', dataIndex: 'receiverName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '运费', dataIndex: 'freight', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }

+ 7 - 19
src/views/salesReturnManagement/custConfirm/list.vue

@@ -114,20 +114,8 @@
           </template>
           <!-- 退货原因 -->
           <template slot="returnReason" slot-scope="text, record">
-            <a-select
-              size="small"
-              v-if="record.isEdit"
-              style="width:100%;"
-              v-model="record.returnReason"
-              placeholder="请选择退货原因"
-              allowClear>
-              <a-select-option v-for="item in returnReasonList" :value="item.code">
-                {{ item.dispName }}
-              </a-select-option>
-            </a-select>
-            <span v-else>
-              {{ record.returnReasonDictValue||'--' }}
-            </span>
+            <returnReason v-if="record.isEdit" v-model="record.returnReason"></returnReason>
+            <span v-else>{{ record.returnReason||'--' }}</span>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -198,6 +186,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import setPriceModal from './setPriceModal.vue'
+import returnReason from '@/views/common/returnReason'
 import chooseProductsModal from '../receiveCheck/chooseProductsModal.vue'
 import { salesReturnDetail, customerServiceConfirm } from '@/api/salesReturn'
 import { salesReturnDetailList, updateByCustomerService, deleteByCustomerService, insertByCustomerService } from '@/api/salesReturnDetail'
@@ -208,7 +197,8 @@ export default {
     STable,
     VSelect,
     setPriceModal,
-    chooseProductsModal
+    chooseProductsModal,
+    returnReason
   },
   data () {
     return {
@@ -243,7 +233,6 @@ export default {
         })
       },
       rowSelectionInfo: null,
-      returnReasonList: [], // 申请退货列表
       showSetPriceModal: false,
       chooseData: [],
       openProductModal: false
@@ -254,7 +243,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '13%', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'initialQty', align: 'center', width: '10%', scopedSlots: { customRender: 'qty' } },
         { title: '仓库实收数量', dataIndex: 'receiveQty', align: 'center', width: '10%', scopedSlots: { customRender: 'receiveQty' } },
@@ -264,7 +253,7 @@ export default {
         // { title: '实际退货单价', dataIndex: 'price', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '实际退货金额', dataIndex: 'totalAmount', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货单价说明', dataIndex: 'priceRemark', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '15%', align: 'center', scopedSlots: { customRender: 'returnReason' } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '20%', align: 'center', scopedSlots: { customRender: 'returnReason' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
@@ -417,7 +406,6 @@ export default {
         _this.setTableH()
       })
       this.orderSn = this.$route.params.sn
-      this.returnReasonList = this.$store.state.app.returnReason
       this.getOrderDetail()
     },
     setTableH () {

+ 15 - 1
src/views/salesReturnManagement/salesReturn/chooseDepartUserModal.vue

@@ -18,6 +18,14 @@
             :rules="rules"
             :label-col="formItemLayout.labelCol"
             :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="退货类型" prop="salesReturnType">
+              <v-select
+                v-model="form.salesReturnType"
+                id="departUser-salesReturnType"
+                code="SALES_RETURN_TYPE"
+                placeholder="请选择退货类型"
+                allowClear></v-select>
+            </a-form-model-item>
             <a-form-model-item label="申请人员" prop="applyPersonSn">
               <employee style="width: 100%;" @change="employeeChange" id="departUser-Employee" v-model="form.applyPersonSn"></employee>
             </a-form-model-item>
@@ -57,11 +65,12 @@
 </template>
 
 <script>
+import { VSelect } from '@/components'
 import dingDepartUser from '@/views/common/dingDepartUser.js'
 import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
 export default {
   name: 'ChooseDepartUserModal',
-  components: { dingDepartUser, employee },
+  components: { dingDepartUser, employee, VSelect },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -79,11 +88,15 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
+        salesReturnType: undefined,
         applyPersonSn: undefined,
         approvers: [], // 审批人
         ccList: [] // 抄送人
       },
       rules: {
+        salesReturnType: [
+          { required: true, message: '请选择退货类型', trigger: 'change' }
+        ],
         applyPersonSn: [
           { required: true, message: '请选择申请人员', trigger: 'change' }
         ],
@@ -142,6 +155,7 @@ export default {
         this.$refs.ruleForm.resetFields()
       })
       this.form = {
+        salesReturnType: undefined,
         applyPersonSn: undefined,
         ccList: undefined,
         approvers: undefined

+ 1 - 0
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -50,6 +50,7 @@
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
               <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditTime || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货类型">{{ detailData&&detailData.salesReturnTypeDictValue || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>