瀏覽代碼

销售单列表

lilei 4 年之前
父節點
當前提交
95c888a0b3
共有 1 個文件被更改,包括 27 次插入40 次删除
  1. 27 40
      src/views/salesManagement/salesQuery/list.vue

+ 27 - 40
src/views/salesManagement/salesQuery/list.vue

@@ -110,11 +110,12 @@
       bordered>
       <!-- 销售单号 -->
       <template slot="salesBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        <span style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        <span style="color: #ed1c24;cursor: pointer;" v-if="record.changeTimes>0">({{ record.changeTimes }})</span>
       </template>
-      <!-- 急件 -->
-      <template slot="oosFlag" slot-scope="text, record">
-        <a-tag :color="record.oosFlag==1?'red':'#ccc'" >{{ record.oosFlagDictValue }}</a-tag>
+      <!-- 总数量 -->
+      <template slot="totalQty" slot-scope="text, record">
+        {{ record.totalQty }}
       </template>
       <!-- 财务状态 -->
       <template slot="financialStatus" slot-scope="text, record">
@@ -129,18 +130,20 @@
           v-if="record.billStatus == 'WAIT_AUDIT'"
           @click="handleEexamine(record)"
         >审核</a-button>
+
         <a-button
           size="small"
           type="link"
+          class="button-warning"
           v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE'"
-          class="button-primary"
-          @click="handleSend(record)"
-        >出库</a-button>
+          @click="handleDispatch(record)"
+        >下推</a-button>
+
         <a-button
           size="small"
           type="link"
           class="button-info"
-          v-if="record.salesBillSource == 'SALES' && record.billStatus !== 'CANCEL' && record.billStatus !== 'FINISH' && record.billStatus != 'WAIT_OUT_WAREHOUSE'"
+          v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
           @click="handleEdit(record)"
         >
           编辑
@@ -148,26 +151,26 @@
         <a-button
           size="small"
           type="link"
-          class="button-error"
-          v-if="record.salesBillSource == 'SALES' && record.billStatus !== 'FINISH' && record.financialStatus !== 'FINISH'"
-          @click="handleDel(record)"
+          class="button-info"
+          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
+          @click="handleEdit(record)"
         >
-          删除
+          改单
         </a-button>
         <a-button
           size="small"
           type="link"
-          class="button-info"
-          v-if="record.salesBillSource == 'PURCHASE' && record.billStatus !== 'CANCEL' && record.billStatus !== 'FINISH' && record.billStatus != 'WAIT_OUT_WAREHOUSE'&& record.billStatus != 'AUDIT_REJECT'"
-          @click="handleEdit(record)"
+          class="button-error"
+          v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
+          @click="handleDel(record)"
         >
-          改单
+          删除
         </a-button>
         <a-button
           size="small"
           type="link"
           class="button-error"
-          v-if="record.salesBillSource == 'PURCHASE' && record.billStatus !== 'FINISH' && record.financialStatus !== 'FINISH'&& record.billStatus != 'AUDIT_REJECT'&& record.billStatus != 'WAIT_OUT_WAREHOUSE'"
+          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
           @click="handleDel(record)"
         >
           取消
@@ -185,7 +188,7 @@ import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import chooseCustomModal from './chooseCustomModal.vue'
 import custList from '@/views/common/custList.js'
-import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
+import { salesList, salesDel, salesWriteAudit, salesCount } from '@/api/sales'
 export default {
   name: 'TableList',
   components: { STable, VSelect, chooseCustomModal, custList },
@@ -226,7 +229,7 @@ export default {
         { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 120, align: 'center' },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 210, align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: 100, align: 'center' },
         { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '已下推数量', dataIndex: 'pushedQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已发货数量', dataIndex: 'dispatchQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -285,6 +288,10 @@ export default {
     // 选择客户成功
     chooseCustomOk (data) {
       this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
+    },
+    // 下推
+    handleDispatch (row) {
+
     },
     //  审核
     handleEexamine (row) {
@@ -297,7 +304,7 @@ export default {
         okText: '审核通过',
         cancelText: '审核不通过',
         onOk () {
-          _this.auditOrder(row.salesBillSn, 'AUDIT_PASS')
+          _this.auditOrder(row.salesBillSn, 'WAIT_OUT_WAREHOUSE')
         },
         onCancel (e) {
           if (!e.triggerCancel) {
@@ -318,26 +325,6 @@ export default {
         }
       })
     },
-    //  出库
-    handleSend (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要出库吗?',
-        centered: true,
-        closable: true,
-        onOk () {
-          salesWriteStockOut({
-            salesBillSn: row.salesBillSn
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
-    },
     // 详情
     handleDetail (row) {
       this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })