chenrui 2 éve
szülő
commit
62fbb1f69b

+ 9 - 0
src/api/pickUp.js

@@ -114,3 +114,12 @@ export const pickUpDetailPrint = params => {
     responseType: 'blob'
   })
 }
+
+// 提货单默认上次审核通过的审批人
+export const getFinishDingUser = (params) => {
+  return axios({
+    url: '/pickUp/queryLastFinishDingUser',
+    data: params,
+    method: 'post'
+  })
+}

+ 12 - 3
src/api/product.js

@@ -22,7 +22,7 @@ export const productPricedList = (params) => {
     method: 'post'
   })
 }
-// 定价批量审核 
+// 定价批量审核
 export const batchAuditPrice = (params) => {
   const url = `/product/pricing/batchAudit`
   return axios({
@@ -360,7 +360,7 @@ export const stackPlaceImport = (params) => {
   })
 }
 // 下载导入模板
-export const stackPlaceImportTemplate= (params) => {
+export const stackPlaceImportTemplate = (params) => {
   return axios({
     url: '/product/stackPlace/importTemplate',
     data: params,
@@ -429,4 +429,13 @@ export const saveBatchImportProduct = (params) => {
     data: params,
     method: 'post'
   })
-}
+}
+
+// 价格变更状态
+export const priceChangeEnabled = (params) => {
+  return axios({
+    url: '/product/priceChange/enabled',
+    data: params,
+    method: 'post'
+  })
+}

+ 25 - 14
src/views/expenseManagement/expenseReimbursement/chooseDepartUserModal.vue

@@ -58,6 +58,7 @@
 import dingDepartUser from '@/views/common/dingDepartUser.js'
 import { getDefaultCofig } from '@/api/data.js'
 import { queryLastFinishDingUser } from '@/api/financeBook.js'
+import { getFinishDingUser } from '@/api/pickUp.js'
 export default {
   name: 'ChooseDepartUserModal',
   components: { dingDepartUser },
@@ -66,11 +67,11 @@ export default {
       type: Boolean,
       default: false
     },
-    useDingDefUser: { // 是否使用最新一次申请人员
-      type: Boolean,
-      default: false
+    type: {
+      type: String,
+      default: ''
     },
-    showDefUser:{
+    showDefUser: { // 是否显示默认值
       type: Boolean,
       default: true
     }
@@ -138,27 +139,37 @@ export default {
         }
       })
     },
-    getFormatUser(list){
+    getFormatUser (list) {
       const ret = []
       list.map(item => {
-        ret.push({label: item.userName, value: item.userId||item.userid})
+        ret.push({ label: item.userName, value: item.userId || item.userid })
       })
       return ret
     },
-    async getDefAudit(){
-      if(!this.useDingDefUser){
+    async getDefAudit () {
+      // 费用单''   提货单'billOfLading'   财务单'financeOrder'
+      if (!this.type) {
         // 默认写死的人员
-        const data = await getDefaultCofig({code:'EXPENSE_ACCOUNT_DING_USER'}).then(res => res.data)
+        const data = await getDefaultCofig({ code: 'EXPENSE_ACCOUNT_DING_USER' }).then(res => res.data)
         const ret = JSON.parse(data.value)
         console.log(ret)
         this.form.approvers = this.getFormatUser(ret.approvers)
         this.form.ccList = this.getFormatUser(ret.ccList)
-      }else{
+      } else if (this.type && this.type == 'financeOrder') {
+        // 取最新一次审核通过值
         const data = await queryLastFinishDingUser().then(res => res.data)
-        if(data.approversTaskList){
+        if (data.approversTaskList) {
+          this.form.approvers = this.getFormatUser(data.approversTaskList)
+        }
+        if (data.ccTaskList) {
+          this.form.ccList = this.getFormatUser(data.ccTaskList)
+        }
+      } else if (this.type && this.type == 'billOfLading') {
+        const data = await getFinishDingUser().then(res => res.data)
+        if (data.approversTaskList) {
           this.form.approvers = this.getFormatUser(data.approversTaskList)
         }
-        if(data.ccTaskList){
+        if (data.ccTaskList) {
           this.form.ccList = this.getFormatUser(data.ccTaskList)
         }
       }
@@ -183,8 +194,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetForm()
-      }else{
-        if(this.showDefUser){
+      } else {
+        if (this.showDefUser) {
           this.getDefAudit()
         }
       }

+ 8 - 8
src/views/financialManagement/financialCollection/edit.vue

@@ -42,8 +42,8 @@
         <a-alert type="info" style="margin-bottom:10px" v-if="detailData">
           <div slot="message">
             共 {{ total }} 条,
-            订单金额合计 {{ toThousands(detailData.orderTotalAmount ||0)}},
-            收款金额合计 {{ toThousands(detailData.receiptTotalAmount ||0)}},
+            订单金额合计 {{ toThousands(detailData.orderTotalAmount ||0) }},
+            收款金额合计 {{ toThousands(detailData.receiptTotalAmount ||0) }},
             使用授信合计 {{ toThousands(detailData.useTotalAmount||0) }},
             授信还款合计 {{ toThousands(detailData.payTotalAmount||0) }},
             余款抵扣合计 {{ toThousands(detailData.balanceTotalAmount||0) }}
@@ -163,7 +163,7 @@
       :bookNo="detailData?detailData.bookNo:''"
       @cancel="openFcDetailModal=false"></fcDetailModal>
     <!-- 选择审核人员 -->
-    <chooseDepartUserModal useDingDefUser :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+    <chooseDepartUserModal type="financeOrder" :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
     <!-- 关联单据 -->
     <selectGlSalesModal
       ref="selGlSalesModal"
@@ -278,7 +278,7 @@ export default {
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
               const cons = data[i].bizType == 'DISPATCH' ? {
-                createDate:data[i].dispatchBill.createDate,
+                createDate: data[i].dispatchBill.createDate,
                 buyerName: data[i].dispatchBill.buyerName,
                 receiverName: data[i].dispatchBill.receiverName,
                 sendNo: data[i].dispatchBill.sendNo,
@@ -290,7 +290,7 @@ export default {
                 dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
                 salesBillSn: data[i].dispatchBill.salesBillSn
               } : {
-                createDate:data[i].allocateBill.createDate,
+                createDate: data[i].allocateBill.createDate,
                 buyerName: data[i].allocateBill.targetName,
                 receiverName: data[i].allocateBill.receiverName,
                 sendNo: data[i].allocateBill.sendNo,
@@ -309,11 +309,11 @@ export default {
           }
           return data
         })
-      },
+      }
     }
   },
-  computed:{
-    glcolumns(){
+  computed: {
+    glcolumns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },

+ 26 - 18
src/views/productManagement/priceChangeRecord/list.vue

@@ -31,6 +31,11 @@
                   <ProductType id="productChangeRecordList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品状态">
+                  <v-select code="ENABLE_FLAG" id="productChangeRecordList-productStatus" v-model="queryParam.enabledFlag" allowClear placeholder="请选择产品状态"></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
@@ -70,7 +75,7 @@
         </template>
         <!-- 变更状态 -->
         <span slot="productStatus" slot-scope="text, record">
-          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
         </span>
         <!-- 省级价变更后 -->
         <template slot="afterProvincePrice" slot-scope="text, record">
@@ -110,7 +115,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
-import { productPriceChangeList, productPriceChangeExport } from '@/api/product'
+import { productPriceChangeList, productPriceChangeExport, priceChangeEnabled } from '@/api/product'
 export default {
   name: 'PriceChangeRecordList',
   mixins: [commonMixin],
@@ -128,7 +133,8 @@ export default {
         productBrandSn: undefined, //  品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        enabledFlag: undefined
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -148,6 +154,7 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].enabledFlag = data.list[i].enabledFlag + '' === '1'
             }
             this.total = data.count || 0
             this.disabled = false
@@ -238,6 +245,7 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
+      this.queryParam.enabledFlag = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -315,21 +323,21 @@ export default {
     },
     // 修改状态
     changeFlagHandle (text, record) {
-      // const _data = {
-      //   id: record.id,
-      //   flag: record.loginFlag ? '1' : '0'
-      // }
-      // this.spinning = true
-      // updateEnableStatus(_data).then(res => {
-      //   if (res.status == 200) {
-      //     this.$message.success(res.message)
-      //     this.$refs.table.refresh()
-      //     this.spinning = false
-      //   } else {
-      //     this.$refs.table.refresh()
-      //     this.spinning = false
-      //   }
-      // })
+      const _data = {
+        id: record.id,
+        enabledFlag: record.enabledFlag ? '1' : '0'
+      }
+      this.spinning = true
+      priceChangeEnabled(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.$refs.table.refresh()
+          this.spinning = false
+        }
+      })
     }
   },
   watch: {

+ 1 - 1
src/views/salesReturnManagement/billOfLading/add.vue

@@ -195,7 +195,7 @@
       :warehouseSn="form.warehouseSn"
       @cancel="closeModal"></selectXtModal>
     <!-- 选择审核人员 -->
-    <chooseDepartUserModal :showDefUser="false" :openModal="openDepartUserModal" @close="closeModal" @submit="handleSubmit"></chooseDepartUserModal>
+    <chooseDepartUserModal type="billOfLading" :showDefUser="true" :openModal="openDepartUserModal" @close="closeModal" @submit="handleSubmit"></chooseDepartUserModal>
   </div>
 </template>