Переглянути джерело

Merge branch 'develop_yh14' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh14

lilei 2 роки тому
батько
коміт
e5c4aa7c03

+ 13 - 0
src/views/allocationManagement/storeTransferOut/list.vue

@@ -57,6 +57,18 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="是否有库存">
+                  <a-select @change="handleHasQty" allowClear :value="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
+                    <a-select-option value="0">
+                      是
+                    </a-select-option>
+                    <a-select-option value="1">
+                      否
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
@@ -72,6 +84,7 @@
       <!-- 操作按钮 -->
       <div class="table-operator">
         <a-button id="storeTransferOutList-add" v-if="$hasPermissions('B_storeTransferOutNews')" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+        <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">包括禁用产品</a-checkbox>
       </div>
       <!-- 统计 -->
       <a-alert type="info" style="margin-bottom:10px">

+ 1 - 1
src/views/customerManagement/customerInfo/detailModal.vue

@@ -19,7 +19,7 @@
           <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
           <a-descriptions-item label="客户传真:">{{ detailData&&detailData.fax || '--' }}</a-descriptions-item>
           <a-descriptions-item label="配送方式:">{{ detailData&&detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="是否卫星仓客户:">{{ detailData&&detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="是否为下级:">{{ detailData&&detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="价格类型:">{{ detailData&&detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="收款方式:">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="客户类型:">{{ detailData&&detailData.customerTypeName || '--' }}</a-descriptions-item>

+ 4 - 1
src/views/customerManagement/customerInfo/edit.vue

@@ -97,7 +97,10 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="8">
-              <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
+              <!-- <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
+                <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
+              </a-form-model-item> -->
+              <a-form-model-item label="是否为下级" prop="satelliteFlag">
                 <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
               </a-form-model-item>
             </a-col>

+ 28 - 4
src/views/customerManagement/customerInfo/list.vue

@@ -22,7 +22,7 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="是否卫星仓客户">
+                <a-form-item label="是否为下级">
                   <v-select code="FLAG" id="customerManagementList-satelliteFlag" v-model="queryParam.satelliteFlag" allowClear placeholder="请选择"></v-select>
                 </a-form-item>
               </a-col>
@@ -104,6 +104,13 @@
             class="button-success"
             @click="handleDetail(record)"
             id="customerManagementList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_customer_customerInfo_edit')"
+            type="link"
+            class="button-primary"
+            @click="mergeCustomer(record)"
+            id="customerManagementList-edit-btn">合并</a-button>
           <span v-if="!$hasPermissions('B_customer_customerInfo_edit') && !$hasPermissions('B_customer_customerInfo_detail')">--</span>
         </template>
         <template slot="enableAction" slot-scope="text, record">
@@ -114,6 +121,8 @@
     </a-spin>
     <!-- 客户详情 -->
     <customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+    <!-- 合并用户 -->
+    <merge-customer-modal :openModal="openMergeModal" :mainCustomerName="customerName" @close="closeMergeModal" />
   </a-card>
 </template>
 
@@ -125,9 +134,10 @@ import custType from '@/views/common/custType.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import customerManagementDetailModal from './detailModal.vue'
+import mergeCustomerModal from './mergeCustomerModal.vue'
 export default {
   name: 'CustomerManagementList',
-  components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType },
+  components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType, mergeCustomerModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -154,7 +164,7 @@ export default {
         { title: '联系手机', dataIndex: 'contactMobile', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否为下级', dataIndex: 'satelliteFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: '8%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
@@ -181,7 +191,9 @@ export default {
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       openModal: false, //  查看客户详情  弹框
-      itemId: '' //  当前客户id
+      itemId: '', //  当前客户id
+      openMergeModal: false, // 合并用户名称
+      customerName: ''// 主题客户名称
     }
   },
   methods: {
@@ -265,6 +277,10 @@ export default {
       this.itemId = ''
       this.openModal = false
     },
+    closeMergeModal () {
+      this.customerName = ''
+      this.openMergeModal = false
+    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -326,6 +342,14 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
+    },
+    // 合并客户
+    mergeCustomer (con) {
+      this.customerName = con.customerName
+      const _this = this
+      this.$nextTick(() => {
+        _this.openMergeModal = true
+      })
     }
   },
   watch: {

+ 138 - 0
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -0,0 +1,138 @@
+<template>
+  <div v-if="isShow">
+    <a-modal
+      centered
+      class="merge-customer-modal"
+      :footer="null"
+      :maskClosable="false"
+      v-drag
+      title="合并"
+      v-model="isShow"
+      @cancle="isShow=false"
+      width="35%">
+      <a-form-model
+        id="bulkPartsTypeEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="主体客户:" prop="mainName">
+          <div>{{ mainCustomerName }}</div>
+        </a-form-model-item>
+        <a-form-model-item label="被合并的客户名称:" prop="buyerSn">
+          <custList ref="custList" @change="custChange" placeholder="输入客户名称搜索"></custList>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button id="modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="modal-save" @click="handleSave">确定</a-button>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import custList from '@/views/common/custList.vue'
+export default {
+  name: 'SalesRecordModal',
+  components: { custList },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    mainCustomerName: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        buyerSn: '', // 被合并客户sn
+        buyerName: '' // 被合并客户名称
+      },
+      rules: {
+        buyerSn: [
+          { required: true, message: '输入客户名称搜索', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 客户 change
+    custChange (obj, row) {
+      if (row) {
+        this.form.buyerSn = row && row.customerSn || undefined
+        this.form.buyerName = undefined
+      } else {
+        this.form.buyerName = obj || undefined
+        this.form.buyerSn = undefined
+      }
+    },
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.confirmedSubmit()
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    confirmedSubmit () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要合并吗?合并后数据不可恢复。',
+        okText: '确定',
+        okType: 'danger',
+        cancelText: '取消',
+        onOk () {
+          _this.$emit('close')
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.form.buyerSn = undefined
+        this.form.buyerName = undefined
+        this.$refs.custList.setData(undefined)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .merge-customer-modal{
+    .ant-modal-body {
+      padding: 20px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 27 - 6
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -13,12 +13,12 @@
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+            <a-col :md="7" :sm="24">
               <a-form-item label="单据号">
                 <a-input id="chooseBillModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="7" :sm="24">
               <a-form-item label="单据类型">
                 <v-select
                   v-model="queryParam.bizType"
@@ -29,6 +29,11 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="10" :sm="24">
+              <a-form-item label="关联单据创建时间">
+                <rangeDate ref="createDate" @change="createDateChange" />
+              </a-form-item>
+            </a-col>
             <a-col :md="7" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="rangeDate" @change="dateChange" />
@@ -38,6 +43,16 @@
               <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseBillModal-refresh">查询</a-button>
               <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="chooseBillModal-reset">重置</a-button>
             </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 18px;">
+              <a-radio-group name="radioGroup" :default-value="1">
+                <a-radio :value="1">
+                  关联单据创建时间正序
+                </a-radio>
+                <a-radio :value="2">
+                  审核时间正序
+                </a-radio>
+              </a-radio-group>
+            </a-col>
           </a-row>
         </a-form>
       </div>
@@ -109,11 +124,12 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '单据号', dataIndex: 'bizNo', width: '28%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据创建时间', dataIndex: 'auditTime', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金额', dataIndex: 'totalAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '余额', dataIndex: 'unsettleAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '金额', dataIndex: 'totalAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '余额', dataIndex: 'unsettleAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -149,6 +165,11 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 关联单据创建时间
+    createDateChange (date) {
+      this.queryParam.auditBeginDate = date[0]
+      this.queryParam.auditEndDate = date[1]
+    },
     //  时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]

+ 29 - 2
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -28,6 +28,31 @@
                 本次结算金额合计<strong>{{ toThousands(currentTotalBalance) }}</strong>
               </div>
             </a-alert>
+            <!-- 查询条件 -->
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="关联单据创建时间">
+                    <rangeDate ref="createDate" @change="createDateChange" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="5" :sm="24">
+                  <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseBillModal-refresh">查询</a-button>
+                  <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="chooseBillModal-reset">重置</a-button>
+                </a-col>
+                <a-col :md="24" :sm="24" style="margin-bottom: 18px;">
+                  <a-radio-group name="radioGroup" :default-value="1">
+                    <a-radio :value="1">
+                      关联单据创建时间正序
+                    </a-radio>
+                    <a-radio :value="2">
+                      审核时间正序
+                    </a-radio>
+                  </a-radio-group>
+                </a-col>
+                </a-row>
+              </a-form>
+            </div>
             <!-- 列表 -->
             <a-table
               class="sTable"
@@ -183,10 +208,11 @@ import chooseBillModal from './chooseBillModal.vue'
 import { settleUnitSave, settleUnitPrint, settleUnitExport, settleInfoAllList } from '@/api/settle'
 import Print from '@/views/common/print.vue'
 import settleAccount from '@/views/common/settleAccount'
+import rangeDate from '@/views/common/rangeDate.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'CollectionPaymentDetail',
-  components: { STable, VSelect, chooseBillModal, Print, settleAccount },
+  components: { STable, VSelect, chooseBillModal, Print, settleAccount, rangeDate },
   mixins: [commonMixin],
   data () {
     this.amountSettledChange = debounce(this.amountSettledChange, 800)
@@ -203,7 +229,8 @@ export default {
       chooseColumns: [
         { title: '序号', scopedSlots: { customRender: 'no' }, width: '5%', align: 'center' },
         { title: '单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据创建时间', dataIndex: 'auditTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '金额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '余额', dataIndex: 'unsettleAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },

+ 14 - 0
src/views/salesManagement/salesQuery/list.vue

@@ -85,6 +85,18 @@
                   <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="是否有库存">
+                  <a-select @change="handleHasQty" allowClear :value="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
+                    <a-select-option value="0">
+                      是
+                    </a-select-option>
+                    <a-select-option value="1">
+                      否
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -111,6 +123,7 @@
       <div class="table-operator">
         <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
         <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
+        <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">包括禁用产品</a-checkbox>
         <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
         <a-popover placement="right">
           <template slot="content">
@@ -118,6 +131,7 @@
           </template>
           <a-icon type="question-circle" />
         </a-popover>
+
       </div>
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">