Browse Source

bug 修复

lilei 4 years ago
parent
commit
a2952af90c

+ 19 - 0
src/views/salesManagement/salesQuery/edit.vue

@@ -227,9 +227,28 @@ export default {
     // 添加产品
     // 添加产品
     insterProduct (row) {
     insterProduct (row) {
       console.log(row)
       console.log(row)
+      // 防止多次添加产品
       if (this.isInster) {
       if (this.isInster) {
         return
         return
       }
       }
+      const _this = this
+      // 库存不足时
+      if (row.currentQty < row.salesNums) {
+        this.$confirm({
+          title: '提示',
+          content: '库存不足,确认添加为急件吗?',
+          centered: true,
+          closable: true,
+          onOk () {
+            _this.saveNewProduct(row)
+          }
+        })
+      } else {
+        this.saveNewProduct(row)
+      }
+    },
+    // 保存添加的产品到销售列表
+    saveNewProduct (row) {
       this.$message.loading('正在添加产品...', 1)
       this.$message.loading('正在添加产品...', 1)
       this.isInster = true
       this.isInster = true
       salesDetailInsert({
       salesDetailInsert({

+ 7 - 13
src/views/salesManagement/salesQuery/list.vue

@@ -40,17 +40,6 @@
                 <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
                 <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="支付方式">
-                <v-select
-                  v-model="queryParam.payType"
-                  ref="payType"
-                  id="salesManagementList-payType"
-                  code="PAY_TYPE"
-                  placeholder="请选择支付方式"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="收款方式">
               <a-form-item label="收款方式">
                 <v-select
                 <v-select
@@ -68,7 +57,7 @@
                   v-model="queryParam.billStatus"
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   ref="billStatus"
                   id="salesManagementList-billStatus"
                   id="salesManagementList-billStatus"
-                  code="BILL_STATUS"
+                  code="SALES_BILL_STATUS"
                   placeholder="请选择业务状态"
                   placeholder="请选择业务状态"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-item>
               </a-form-item>
@@ -129,6 +118,10 @@
       <template slot="financialStatus" slot-scope="text, record">
       <template slot="financialStatus" slot-scope="text, record">
         <a-tag :color="record.state==1?'green':'red'" >{{ record.financialStatus }}</a-tag>
         <a-tag :color="record.state==1?'green':'red'" >{{ record.financialStatus }}</a-tag>
       </template>
       </template>
+      <!-- 急件 -->
+      <template slot="oosFlag" slot-scope="text, record">
+        <a-tag :color="record.oosFlag==1?'red':'#ccc'" >{{ record.oosFlag==1?'有':'无' }}</a-tag>
+      </template>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
         <a-button
         <a-button
@@ -198,6 +191,7 @@ export default {
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '来源', dataIndex: 'salesBillSource', width: 160, align: 'center' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: 180, align: 'center' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: 180, align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -206,7 +200,7 @@ export default {
         { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款方式', dataIndex: 'settleStyle', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款方式', dataIndex: 'settleStyle', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '急件', dataIndex: 'oosFlag', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '急件', dataIndex: 'oosFlag', scopedSlots: { customRender: 'oosFlag' }, width: 100, align: 'center' },
         { title: '业务状态', scopedSlots: { customRender: 'billStatus' }, width: 110, align: 'center' },
         { title: '业务状态', scopedSlots: { customRender: 'billStatus' }, width: 110, align: 'center' },
         { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
         { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 300, align: 'center', fixed: 'right' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 300, align: 'center', fixed: 'right' }