瀏覽代碼

bug 修复

lilei 3 年之前
父節點
當前提交
0004c4f84e
共有 2 個文件被更改,包括 37 次插入13 次删除
  1. 13 2
      src/views/salesManagement/salesQuery/edit.vue
  2. 24 11
      src/views/salesManagement/salesQuery/list.vue

+ 13 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -258,6 +258,10 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+    // 是否上级改单
+    isSuperEdit () {
+      return this.detailData && this.detailData.salesBillSource == 'PURCHASE' && (this.detailData.billStatus == 'SUPERIOR_CHANGE' || this.detailData.billStatus == 'WAIT_AUDIT')
+    },
     columns () {
     columns () {
       const arr = [
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -265,8 +269,8 @@ export default {
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        // { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
         { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -274,6 +278,13 @@ export default {
         { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
       ]
+      // 下级创建,不显示仓库仓位
+      if (this.isSuperEdit) {
+        arr.splice(5, 0, { title: '库存数量', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      } else {
+        arr.splice(5, 0, { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } })
+        arr.splice(6, 0, { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
       if (this.isCosts) {
       if (this.isCosts) {
         arr.splice(7, 0, { slots: { title: 'costTitle' }, dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(7, 0, { slots: { title: 'costTitle' }, dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       }

+ 24 - 11
src/views/salesManagement/salesQuery/list.vue

@@ -10,23 +10,29 @@
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                 <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
                 <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="销售单号">
               <a-form-item label="销售单号">
                 <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
                 <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="单据来源">
+                <v-select
+                  v-model="queryParam.salesBillSource"
+                  ref="salesBillSource"
+                  id="salesManagementList-salesBillSource"
+                  code="SALES_SOURCE"
+                  placeholder="请选择单据来源"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="采购单号">
-                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="收款方式">
                 <a-form-item label="收款方式">
                   <settleStyle
                   <settleStyle
                     id="salesManagementList-settleStyleSn"
                     id="salesManagementList-settleStyleSn"
@@ -35,7 +41,7 @@
                   </settleStyle>
                   </settleStyle>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="业务状态">
                 <a-form-item label="业务状态">
                   <v-select
                   <v-select
                     v-model="queryParam.billStatus"
                     v-model="queryParam.billStatus"
@@ -46,7 +52,7 @@
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="财务状态">
                 <a-form-item label="财务状态">
                   <v-select
                   <v-select
                     v-model="queryParam.financialStatus"
                     v-model="queryParam.financialStatus"
@@ -57,6 +63,11 @@
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="采购单号">
+                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+                </a-form-item>
+              </a-col>
             </template>
             </template>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
               <span class="table-page-search-submitButtons">
@@ -228,7 +239,8 @@ export default {
         payType: undefined, //  支付方式
         payType: undefined, //  支付方式
         settleStyleSn: undefined, //  收款方式
         settleStyleSn: undefined, //  收款方式
         billStatus: undefined, //  业务状态
         billStatus: undefined, //  业务状态
-        financialStatus: undefined //  财务状态
+        financialStatus: undefined, //  财务状态
+        salesBillSource: undefined
       },
       },
       totalData: {
       totalData: {
         totalAmount: 0,
         totalAmount: 0,
@@ -402,6 +414,7 @@ export default {
       this.queryParam.settleStyleSn = undefined
       this.queryParam.settleStyleSn = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
       this.queryParam.financialStatus = undefined
+      this.queryParam.salesBillSource = undefined
       this.$refs.custList.resetForm()
       this.$refs.custList.resetForm()
     },
     },
     //  导出
     //  导出