Browse Source

bug修复

chenrui 3 năm trước cách đây
mục cha
commit
b712abedfb

+ 37 - 110
src/views/salesManagement/salesReturn/queryPart.vue

@@ -1,27 +1,27 @@
 <template>
-  <div class="productInfoList-wrap">
+  <div class="salesReturnList-wrap">
     <!-- 搜索条件 -->
     <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" v-if="grabFlag == 1">
             <a-form-item label="销售单号">
-              <a-input id="productInfoList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              <a-input id="salesReturnList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
-              <a-input id="productInfoList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              <a-input id="salesReturnList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
-              <a-input id="productInfoList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              <a-input id="salesReturnList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnList-reset">重置</a-button>
           </a-col>
         </a-row>
       </a-form>
@@ -35,8 +35,9 @@
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
+      :rowClassName="(record, index) => (grabFlag == '1'&&record.refundableQty==0) ? 'redBg-row':''"
       :defaultLoadData="false"
-      :scroll="{ x: grabFlag == '1' ? 1700 : 860, y: 300 }"
+      :scroll="{ x: grabFlag == '1' ? 1380 : 1020, y: 300 }"
       bordered>
       <!-- 本次退货数量 -->
       <template slot="qty" slot-scope="text, record">
@@ -66,6 +67,7 @@
           type="primary"
           class="button-info"
           :loading="newLoading"
+          :disabled="grabFlag == '1'&&record.refundableQty==0"
           @click="handleAdd(record)"
         >添加</a-button>
       </template>
@@ -126,110 +128,28 @@ export default {
   mounted () {
     // 抓单
     if (this.grabFlag == 1) {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 80
-      },
-      {
-        title: '销售单号',
-        dataIndex: 'salesBillNo',
-        align: 'center',
-        width: 220
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productEntity.code',
-        align: 'center'
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productEntity.name',
-        align: 'center'
-      },
-      {
-        title: '售价',
-        dataIndex: 'price',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '剩余可退数量',
-        dataIndex: 'refundableQty',
-        align: 'center',
-        width: 110
-      },
-      {
-        title: '本次退货数量',
-        dataIndex: 'qty',
-        align: 'center',
-        scopedSlots: { customRender: 'qty' },
-        width: 120
-      },
-      {
-        title: '采购价',
-        dataIndex: 'showCost',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '单位',
-        dataIndex: 'productEntity.unit',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 100
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '剩余可退数量', dataIndex: 'refundableQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次退货数量', dataIndex: 'qty', width: 120, align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '采购价', dataIndex: 'showCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
     } else {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 80
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productCode',
-        align: 'center',
-        customRender: function (text) { return text || '--' }
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productName',
-        align: 'center'
-      },
-      {
-        title: '当前售价',
-        dataIndex: 'productPrice',
-        align: 'center',
-        width: 120,
-        customRender: function (text) { return '¥' + (text || 0) }
-      },
-      {
-        title: '退货数量',
-        dataIndex: 'qty',
-        align: 'center',
-        scopedSlots: { customRender: 'qty' },
-        width: 120
-      },
-      {
-        title: '采购价',
-        dataIndex: 'lastStockCost',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '单位',
-        dataIndex: 'productUnit',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 120
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '当前售价', dataIndex: 'productPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '采购价', dataIndex: 'lastStockCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
+      ]
     }
   },
   methods: {
@@ -262,3 +182,10 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .salesReturnList-wrap{
+    .redBg-row{
+      background-color: #f5cdc8;
+    }
+  }
+</style>

+ 8 - 51
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -87,57 +87,14 @@ export default {
       },
       // 表头
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '产品编码',
-          dataIndex: 'productEntity.code',
-          align: 'center',
-          width: 160
-        },
-        {
-          title: '产品名称',
-          dataIndex: 'productEntity.name',
-          align: 'center',
-          width: 200
-        },
-        {
-          title: '退货数量',
-          dataIndex: 'qty',
-          align: 'center',
-          width: 150
-        },
-        {
-          title: '坏件数量',
-          dataIndex: 'badQty',
-          align: 'center',
-          width: 150
-        },
-        {
-          title: '返库数量',
-          dataIndex: 'backStockQty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'backStockQty' }
-        },
-        {
-          title: '单位',
-          dataIndex: 'productEntity.unit',
-          align: 'center',
-          customRender: function (text) { return text || '--' },
-          width: 100
-        },
-        {
-          title: '售价',
-          dataIndex: 'price',
-          customRender: function (text) { return '¥' + (text || 0) },
-          align: 'center',
-          width: 150
-        }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: 160 },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', width: 200 },
+        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 150 },
+        { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: 150 },
+        { title: '返库数量', dataIndex: 'backStockQty', width: 150, align: 'center', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', customRender: function (text) { return text || '--' }, width: 100 },
+        { title: '售价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 150 }
       ],
       chooseLoadData: [],
       // 加载数据方法 必须为 Promise 对象

+ 6 - 6
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -37,7 +37,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1500, y: 300 }"
+          :scroll="{ x: 1220, y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -119,11 +119,11 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center' },
-        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
-        { title: '退货单价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 150 },
-        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100 },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 100, scopedSlots: { customRender: 'qty' } },
+        { title: '退货单价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 100 },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
         { title: '退货小计', align: 'center', dataIndex: 'totalAmount', customRender: function (text) { return '¥' + (text || 0) }, width: 100 },
         { title: '退货原因', dataIndex: 'remark', align: 'center', width: 200, scopedSlots: { customRender: 'remark' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }

+ 7 - 7
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -35,7 +35,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1500, y: 300 }"
+          :scroll="{ x: 1640, y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -117,15 +117,15 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: 200 },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '剩余可退数量', dataIndex: 'refundableQty', align: 'center', width: 120, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
-        { title: '退货单价', dataIndex: 'price', align: 'center', width: 150, customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100 },
+        { title: '退货单价', dataIndex: 'price', align: 'center', width: 100, customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
         { title: '退货小计', align: 'center', width: 100, dataIndex: 'totalAmount', customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '退货原因', dataIndex: 'remark', align: 'center', width: 150, scopedSlots: { customRender: 'remark' } },
+        { title: '退货原因', dataIndex: 'remark', align: 'center', width: 200, scopedSlots: { customRender: 'remark' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       chooseLoadData: [],