Quellcode durchsuchen

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

lilei vor 4 Jahren
Ursprung
Commit
bff9a8c7b9

+ 22 - 106
src/views/salesManagement/salesReturn/queryPart.vue

@@ -41,13 +41,13 @@
     <s-table
       class="sTable"
       ref="table"
-      size="default"
+      size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
       :defaultLoadData="false"
-      :scroll="{ x: grabFlag == '1' ? 1100 : 660, y: 300 }"
+      :scroll="{ x: grabFlag == '1' ? 1620 : 1040, y: 300 }"
       bordered>
       <!-- 价格 -->
       <template slot="price" slot-scope="text, record">
@@ -142,111 +142,27 @@ export default {
   mounted () {
     // 抓单
     if (this.grabFlag == 1) {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 100
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'dealerProductEntity.code',
-        align: 'center',
-        sorter: true,
-        width: 160
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'dealerProductEntity.name',
-        align: 'center'
-      },
-      {
-        title: '原厂编码',
-        dataIndex: 'dealerProductEntity.origCode',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 120
-      },
-      {
-        title: '销售单号',
-        dataIndex: 'salesBillNo',
-        align: 'center',
-        width: 160
-      },
-      {
-        title: '销售审核时间',
-        dataIndex: 'auditTime',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 120
-      },
-      {
-        title: '售价',
-        dataIndex: 'price',
-        align: 'center',
-        width: 120,
-        scopedSlots: { customRender: 'price' }
-      },
-      {
-        title: '单位',
-        dataIndex: 'dealerProductEntity.unit',
-        align: 'center',
-        width: 100
-      },
-      {
-        title: '销售数量',
-        dataIndex: 'qty',
-        align: 'center',
-        width: 100
-      },
-      {
-        title: '已退数量',
-        dataIndex: 'hasReturnQty',
-        align: 'center',
-        width: 120
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', align: 'center', sorter: true, width: 220 },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center' },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', align: 'center', customRender: function (text) { return text || '--' }, width: 220 },
+        { title: '销售单号', dataIndex: 'salesBillNo', align: 'center', width: 220 },
+        { title: '销售审核时间', dataIndex: 'auditTime', align: 'center', customRender: function (text) { return text || '--' }, width: 160 },
+        { title: '售价', dataIndex: 'price', align: 'center', width: 100, scopedSlots: { customRender: 'price' } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', align: 'center', width: 100 },
+        { title: '销售数量', dataIndex: 'qty', align: 'center', width: 100 },
+        { title: '已退数量', dataIndex: 'hasReturnQty', align: 'center', width: 100 },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
     } else {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 100
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productCode',
-        align: 'center',
-        sorter: true,
-        width: 160
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productName',
-        align: 'center'
-      },
-      {
-        title: '原厂编码',
-        dataIndex: 'productOrigCode',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 160
-      },
-      {
-        title: '售价',
-        dataIndex: 'salePrice',
-        align: 'center',
-        width: 120,
-        scopedSlots: { customRender: 'price' }
-      },
-      {
-        title: '单位',
-        dataIndex: 'unit',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 120
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
+        { title: '产品编码', dataIndex: 'productCode', align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'productName', align: 'center' },
+        { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'salePrice', align: 'center', width: 100, scopedSlots: { customRender: 'price' } },
+        { title: '单位', dataIndex: 'unit', align: 'center', customRender: function (text) { return text || '--' }, width: 100 },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }]
     }
   },
   methods: {

+ 24 - 90
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -1,29 +1,17 @@
 <template>
   <div>
-    <a-affix :target="() => this.$refs.container">
-      <a-page-header
-        :ghost="false"
-        @back="handleBack"
-        :backIcon="false"
-      >
-        <template slot="subTitle">
-          <a id="back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName }}</span>
-          <!-- <a-button size="small" @click="handleEditCustom" style="margin-left:50px" key="0">
-            编辑
-          </a-button> -->
-        </template>
-        <template slot="extra">
-          <a-button key="2">
-            打印预览
-          </a-button>
-          <a-button key="1" type="primary">
-            快速打印
-          </a-button>
-        </template>
-      </a-page-header>
-    </a-affix>
-
+    <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="salesReturnEdit-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="salesReturnEdit-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
     <a-card size="small" :bordered="false" class="pages-wrap">
       <!-- 查询配件列表 -->
       <queryPart :buyerSn="$route.params.buyerSn" :priceType="ordeDetail.priceType" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
@@ -84,11 +72,11 @@
       <s-table
         class="sTable"
         ref="table"
-        size="default"
+        size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1500, y: 300 }"
+        :scroll="{ x: 1830, y: 300 }"
         bordered>
         <!-- 本次退货数量 -->
         <template slot="qty" slot-scope="text, record">
@@ -202,71 +190,17 @@ export default {
       countData: null,
       // 表头
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '产品编码',
-          dataIndex: 'dealerProductEntity.code',
-          align: 'center',
-          width: 160
-        },
-        {
-          title: '产品名称',
-          dataIndex: 'dealerProductEntity.name',
-          align: 'center',
-          width: 200
-        },
-        {
-          title: '原厂编码',
-          dataIndex: 'dealerProductEntity.origCode',
-          align: 'center',
-          width: 160,
-          customRender: function (text) { return text || '--' }
-        },
-        {
-          title: '售价',
-          dataIndex: 'price',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'price' }
-        },
-        {
-          title: '单位',
-          dataIndex: 'dealerProductEntity.unit',
-          align: 'center',
-          width: 100
-        },
+        { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', align: 'center', width: 150, scopedSlots: { customRender: 'price' } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' },
-        {
-          title: '退货数量',
-          dataIndex: 'qty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'qty' }
-        },
-        {
-          title: '废品数量',
-          dataIndex: 'celQty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'celQty' }
-        },
-        {
-          title: '退货金额小计',
-          align: 'center',
-          scopedSlots: { customRender: 'returnAmount' },
-          width: 100
-        },
-        {
-          title: '折后金额小计',
-          dataIndex: 'discountedAmount',
-          align: 'center',
-          width: 100
-        },
+        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
+        { title: '废品数量', dataIndex: 'celQty', align: 'center', width: 150, scopedSlots: { customRender: 'celQty' } },
+        { title: '退货金额小计', align: 'center', scopedSlots: { customRender: 'returnAmount' }, width: 120 },
+        { title: '折后金额小计', dataIndex: 'discountedAmount', align: 'center', width: 120, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       chooseLoadData: [],

+ 34 - 110
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -1,29 +1,17 @@
 <template>
   <div>
-    <a-affix :target="() => this.$refs.container">
-      <a-page-header
-        :ghost="false"
-        @back="handleBack"
-        :backIcon="false"
-      >
-        <template slot="subTitle">
-          <a id="back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName }}</span>
-          <!-- <a-button size="small" @click="handleEditCustom" style="margin-left:50px" key="0">
-            编辑
-          </a-button> -->
-        </template>
-        <template slot="extra">
-          <a-button key="2">
-            打印预览
-          </a-button>
-          <a-button key="1" type="primary">
-            快速打印
-          </a-button>
-        </template>
-      </a-page-header>
-    </a-affix>
-
+    <a-page-header :ghost="false" :backIcon="false" class="salesReturnGrabEdit-back" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="salesReturnGrabEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="salesReturnGrabEdit-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="salesReturnGrabEdit-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
     <a-card size="small" :bordered="false" class="pages-wrap">
       <!-- 查询配件列表 -->
       <queryPart :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
@@ -84,11 +72,11 @@
       <s-table
         class="sTable"
         ref="table"
-        size="default"
+        size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1770, y: 300 }"
+        :scroll="{ x: 2070, y: 300 }"
         bordered>
         <!-- 本次退货数量 -->
         <template slot="qty" slot-scope="text, record">
@@ -192,83 +180,19 @@ export default {
       countData: null,
       // 表头
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '产品编码',
-          dataIndex: 'dealerProductEntity.code',
-          align: 'center',
-          width: 160
-        },
-        {
-          title: '产品名称',
-          dataIndex: 'dealerProductEntity.name',
-          align: 'center',
-          width: 200
-        },
-        {
-          title: '原厂编码',
-          dataIndex: 'dealerProductEntity.origCode',
-          align: 'center',
-          width: 160,
-          customRender: function (text) { return text || '--' }
-        },
-        {
-          title: '销售单号',
-          dataIndex: 'salesBillNo',
-          align: 'center',
-          width: 200
-        },
-        {
-          title: '售价',
-          dataIndex: 'price',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'price' }
-        },
-        {
-          title: '单位',
-          dataIndex: 'dealerProductEntity.unit',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '销售数量',
-          dataIndex: 'salesQty',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '本次退货数量',
-          dataIndex: 'qty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'qty' }
-        },
-        {
-          title: '废品数量',
-          dataIndex: 'celQty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'celQty' }
-        },
+        { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', align: 'center', width: 200, customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', align: 'center', width: 100, scopedSlots: { customRender: 'price' } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
+        { title: '销售数量', dataIndex: 'salesQty', align: 'center', width: 100, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
+        { title: '废品数量', dataIndex: 'celQty', align: 'center', width: 150, scopedSlots: { customRender: 'celQty' } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' },
-        {
-          title: '退货金额小计',
-          align: 'center',
-          scopedSlots: { customRender: 'returnAmount' },
-          width: 100
-        },
-        {
-          title: '折后金额小计',
-          dataIndex: 'discountedAmount',
-          align: 'center',
-          width: 100
-        },
+        { title: '退货金额小计', align: 'center', scopedSlots: { customRender: 'returnAmount' }, width: 120 },
+        { title: '折后金额小计', dataIndex: 'discountedAmount', align: 'center', width: 120, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       chooseLoadData: [],
@@ -330,14 +254,14 @@ export default {
     getWarehouseCascade () {
       warehouseCascadeList({}).then(res => {
         if (res.status == 200) {
-		  res.data.map(item => {
-		    item.sn = item.warehouseSn
-		    if (item.warehouseLocationList) {
-		  	item.warehouseLocationList.map(subItem => {
-		  	  subItem.sn = subItem.warehouseLocationSn
-		  	})
-		    }
-		  })
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
           this.warehouseCascadeData = res.data
         } else {
           this.warehouseCascadeData = []