Bladeren bron

bug 修复

lilei 2 jaren geleden
bovenliggende
commit
6753b1a70c

+ 7 - 5
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -32,7 +32,7 @@
                 show-search
                 id="allocateBill-basicInfo-dealerName"
                 v-model="form.targetSn"
-                placeholder="请选择"
+                placeholder="请选择经销商"
                 :filter-option="false"
                 :not-found-content="fetching ? undefined : null"
                 @search="fetchUser"
@@ -51,12 +51,12 @@
           </a-col>
           <a-col :md="12" :sm="24">
             <a-form-model-item label="费用归属品牌">
-              <ProductBrand id="allocateBill-basicInfo-productBrandSn" @change="changeBrand" v-model="form.productBrandSn" placeholder="请选择费用归属品牌"></ProductBrand>
+              <ProductBrand id="allocateBill-basicInfo-productBrandSn" @change="changeBrand" v-model="form.productBrandSn" placeholder="请选择费用归属品牌(单选)"></ProductBrand>
             </a-form-model-item>
           </a-col>
           <a-col :md="12" :sm="24">
             <a-form-model-item label="费用归属品类">
-              <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="allocateBill-basicInfo-productType"></productTypeAll>
+              <productTypeAll placeholder="请选择费用归属品类(单选,可选二级或三级)" @change="changeProductType" v-model="productType" id="allocateBill-basicInfo-productType"></productTypeAll>
             </a-form-model-item>
           </a-col>
           <a-col :md="12" :sm="24">
@@ -64,7 +64,6 @@
               <a-range-picker
                 style="width:100%"
                 v-model="form.time"
-                show-time
                 :format="dateFormat"
                 @change="dateChange"
                 @calendarChange="dateCalendarChange"
@@ -144,7 +143,7 @@ export default {
       dealerData: [], //  经销商  下拉数据
       targetTypeList: [], //  调往对象类型
       allocateTypeVal: [],
-      dateFormat: 'YYYY-MM-DD HH:mm:ss',
+      dateFormat: 'YYYY-MM-DD',
       selectPriceDate: '',
       isEdit: false
     }
@@ -296,6 +295,9 @@ export default {
           if (this.detailData.productTypeSn1) {
             this.productType = [this.detailData.productTypeSn1, this.detailData.productTypeSn2, this.detailData.productTypeSn3]
           }
+          if (this.form.promoStartDate && this.form.promoEndDate) {
+            this.form.time = [this.form.promoStartDate, this.form.promoEndDate]
+          }
         }
       }
     }

+ 4 - 7
src/views/allocationManagement/transferOut/detail.vue

@@ -173,14 +173,10 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '成本价', dataIndex: 'cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出数量', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-        // { title: '成本小计(¥)', dataIndex: 'totalCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '售价小计(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '调出数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(5, 0, { title: '成本价', dataIndex: 'cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -191,6 +187,7 @@ export default {
         arr.splice(ind, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(ind + 3, 0, { title: '售价小计(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      arr.push({ title: '费用归属部门', dataIndex: 'departmentName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
       return arr
     }
   },

+ 10 - 3
src/views/allocationManagement/transferOut/edit.vue

@@ -553,7 +553,8 @@ export default {
         price: isEdit ? row.price : row.productPrice,
         qty: isEdit ? row.qty : 1, //  添加时调出数量默认为1
         productSn: row.productSn,
-        departmentSn: row.departmentSn
+        departmentSn: row.departmentSn,
+        departmentName: row.departmentName
       }
       if (isEdit) { // 编辑
         // 清空数量时,值应保持未清空前的值,因数量不可为空
@@ -574,6 +575,7 @@ export default {
             this.$refs.table.refresh()
           }
           this.$refs.chooseTable.refresh()
+          this.$refs.chooseTable.clearSelected()
           this.spinning = false
         } else {
           this.spinning = false
@@ -675,8 +677,13 @@ export default {
     },
     // 已选产品 修改部门
     handleChange (value, record) {
-      const department = this.departmentList.find(item => item.departmentSn == record.departmentSn)
-      record.departmentName = department ? department.name : ''
+      if (value) {
+        const department = this.departmentList.find(item => item.departmentSn == record.departmentSn)
+        record.departmentName = department ? department.name : ''
+      } else {
+        record.departmentSn = ''
+        record.departmentName = ''
+      }
       this.handleAdd(record, 'edit', 'noRefresh')
     },
     // 已选产品 售价  change

+ 5 - 1
src/views/common/months.js

@@ -1,7 +1,7 @@
 const Months = {
   template: `
       <a-select
-        placeholder="请选择月份"
+        :placeholder="placeholder"
         :id="id"
         allowClear
         :value="defaultVal"
@@ -31,6 +31,10 @@ const Months = {
     disabled: {
       type: Boolean,
       default: false
+    },
+    placeholder:{
+      type: String,
+      default: '请选择月份'
     }
   },
   data() {

+ 4 - 4
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -96,12 +96,12 @@
           <!-- 产品信息 -->
           <template slot="cpxx" slot-scope="text,record">
             <div style="display:flex;align-items: center;" v-if="record.detailProductsList">
-              <a-icon style="color:red;font-size:20px;" v-if="record.ptaFlag" type="exclamation-circle" />
+              <a-icon style="color:red;font-size:16px;" v-if="record.ptaFlag" type="exclamation-circle" />
               <div style="padding-left: 6px;">
                 <div v-for="item in record.detailProductsList" :key="item.id">
-                  <div v-if="item.productCode">{{ item.productCode }}: ¥{{ item.expense }}</div>
-                  <div v-else-if="item.productBrandName">{{ item.productBrandName }}<span v-if="item.productTypeShowName">/</span>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
-                  <div v-else>{{ item.productTypeShowName }}: ¥{{ item.expense }}</div>
+                  <div v-if="item.productCode">{{ item.productCode }}: <span :style="{color:record.ptaFlag?'red':''}">¥{{ item.expense }}</span></div>
+                  <div v-else-if="item.productBrandName">{{ item.productBrandName }}<span v-if="item.productTypeShowName">/</span>{{ item.productTypeShowName }}: <span :style="{color:record.ptaFlag?'red':''}">¥{{ item.expense }}</span></div>
+                  <div v-else>{{ item.productTypeShowName }}: <span :style="{color:record.ptaFlag?'red':''}">¥{{ item.expense }}</span></div>
                 </div>
               </div>
             </div>

+ 1 - 0
src/views/expenseManagement/expenseReimbursement/baseDataModal.vue

@@ -171,6 +171,7 @@ export default {
         this.form.expenseAccountFilesList = ''
         this.$refs.attachList.setFileList('')
         this.$refs.ruleForm.resetFields()
+        this.expenseTypes = []
         if (this.expenseAccountSn) { //  编辑页
           this.getDetail()
           this.title = '编辑费用报销单'

+ 16 - 5
src/views/reportData/expenseAccountReport/bearerList.vue

@@ -13,7 +13,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <months v-model="queryParam.months" mode="multiple" style="width: 100%;"/>
+                <months v-model="queryParam.months" placeholder="请选择月份(多选)" mode="multiple" style="width: 100%;"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -23,21 +23,23 @@
                   allowClear
                   style="width: 100%;"
                   v-model="queryParam.targetType"
-                  placeholder="请选择承担方类型"
+                  @change="targetChange"
+                  placeholder="请选择费用承担方类型"
                 ></v-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="费用承担方名称" prop="targetSn">
                 <!-- 部门 -->
-                <department v-show="queryParam.targetType=='DEPARTMENT'" style="width: 100%;" placeholder="请选择承担方" v-model="queryParam.targetSn"></department>
+                <department v-show="queryParam.targetType=='DEPARTMENT'" style="width: 100%;" placeholder="请选择费用承担方名称" v-model="queryParam.targetSn"></department>
                 <!-- 经销商 -->
                 <custList
                   v-show="queryParam.targetType=='CUSTOMER'"
+                  ref="custList"
                   cooperateFlag="1"
                   @change="custChange"
-                  placeholder="请选择(输入名称搜索)"></custList>
-                <a-select v-if="!queryParam.targetType" placeholder="请选择承担方"></a-select>
+                  placeholder="请选择经销商(输入名称搜索)"></custList>
+                <a-select v-if="!queryParam.targetType" placeholder="请选择费用承担方名称"></a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -192,6 +194,10 @@ export default {
       ]
 
       if (this.queryParam.months) {
+        // 月份排序
+        this.queryParam.months.sort((a, b) => {
+          return a.split('-')[1] - b.split('-')[1]
+        })
         for (let i = 0; i < this.queryParam.months.length; i++) {
           const item = this.queryParam.months[i]
           arr.push({
@@ -216,6 +222,11 @@ export default {
       })
       this.columns = arr
     },
+    targetChange (v) {
+      // 清空费用承担方名称
+      this.queryParam.targetSn = undefined
+      this.$refs.custList.resetForm()
+    },
     custChange (v, obj, id) {
       this.queryParam.targetSn = v.key
       this.$refs.ruleForm.validateField('targetSn')

+ 5 - 1
src/views/reportData/expenseAccountReport/categoryList.vue

@@ -13,7 +13,7 @@
           <a-row :gutter="15">
             <a-col :md="8" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <months v-model="queryParam.months" mode="multiple" style="width: 100%;"/>
+                <months v-model="queryParam.months" placeholder="请选择月份(多选)" mode="multiple" style="width: 100%;"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -172,6 +172,10 @@ export default {
       ]
 
       if (this.queryParam.months) {
+        // 月份排序
+        this.queryParam.months.sort((a, b) => {
+          return a.split('-')[1] - b.split('-')[1]
+        })
         for (let i = 0; i < this.queryParam.months.length; i++) {
           const item = this.queryParam.months[i]
           arr.push({

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

@@ -51,6 +51,12 @@
               <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-item label="附件" :span="3">
+                <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
+                  {{ item.fileName }}
+                </a>
+                <span v-if="detailData.attachmentList.length==0">--</span>
+              </a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>