lilei 3 سال پیش
والد
کامیت
b4b54751e8

+ 1 - 1
src/components/custom.less

@@ -157,7 +157,7 @@ body{
     margin: 0;
     tr:hover{
       td{
-        background: rgba(255, 170, 127, 0.6);
+        background: rgba(255, 170, 0, 0.4);
         color: #fff;
       }
     }

+ 27 - 10
src/views/salesManagement/salesQuery/edit.vue

@@ -45,7 +45,7 @@
                   :min="0"
                   :precision="2"
                   :max="999999"/>
-                <a-button size="small" type="primary" @click="salesDiscount" class="button-info">打折</a-button>
+                <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
               </div>
               <div>
                 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
@@ -82,15 +82,13 @@
             <a-col :span="6">
               <div style="float:right;overflow: hidden;margin-top: 5px;">
                 <a-button
-                  size="small"
-                  type="info"
-                  @click="delSalerDetailAll"
+                  type="primary"
+                  @click="delSalerOrder"
                   :loading="delLoading"
                   style="margin-right: 10px"
                   id="salesEdit-del-all">整单删除</a-button>
                 <a-button
-                  size="small"
-                  style="padding: 0 20px;"
+                  style="padding: 0 25px;"
                   type="primary"
                   :disabled="spinning"
                   class="button-primary"
@@ -109,7 +107,7 @@
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
-          :pageSize="10"
+          :pageSize="5"
           :rowClassName="(record, index) => record.cost > record.price ? 'redBg-row':''"
           bordered>
           <!-- 产品编码 -->
@@ -169,7 +167,7 @@ import { STable, VSelect } from '@/components'
 import queryPart from './queryPart.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
 import { stockByProductSn } from '@/api/stock'
-import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport } from '@/api/sales'
+import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
 import { salesDetailList, salesDetailInsert, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll } from '@/api/salesDetail'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
@@ -362,7 +360,27 @@ export default {
         }
       })
     },
-    // 整单删除
+    // 删除销售单
+    delSalerOrder () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除该销售单吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          salesDel({ id: _this.orderId }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.handleBack()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 删除已选产品
     delSalerDetailAll () {
       const _this = this
       this.$confirm({
@@ -543,7 +561,6 @@ export default {
   .salesEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 51px;
     box-sizing: border-box;
     >.ant-spin-nested-loading{
       overflow-y: scroll;

+ 5 - 5
src/views/salesManagement/salesQuery/queryPart.vue

@@ -150,13 +150,13 @@
         <a-button
           size="small"
           type="link"
-          class="button-error"
+          class="button-geekblue"
           @click="handleAdd(record)"
           id="productInfoList-edit-btn">添加</a-button>
         <a-button
           size="small"
           type="link"
-          class="button-default"
+          class="button-info"
           @click="handleDetail(record)"
           id="productInfoList-detail-btn"
           style="margin-left: 5px;">销售记录</a-button>
@@ -288,9 +288,9 @@ export default {
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'currentQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '9%', align: 'center' },
-        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '9%', align: 'center' },
-        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
+        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '7%', align: 'center' },
+        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '7%', align: 'center' },
+        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ]
       if (this.cost) {
         arr.splice(6, 0, { title: '成本价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })

+ 3 - 2
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -451,8 +451,9 @@ export default {
         'productSn': row.productSn,
         'celQty': row.celQty,
         'hasReturnQty': row.hasReturnQty,
-        'warehouseLocationSn': row.warehouseLocationSn,
-        'warehouseSn': row.warehouseSn
+        'qty': 1,
+        'warehouseLocationSn': '100000000165',
+        'warehouseSn': '100000000156'
       }
       // 编辑
       if (type == 'edit') {

+ 1 - 0
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -438,6 +438,7 @@ export default {
         'cost': row.cost,
         'productSn': row.productSn,
         'celQty': row.celQty,
+        'qty': row.qty - row.hasReturnQty,
         'hasReturnQty': row.hasReturnQty,
         'warehouseLocationSn': row.warehouseLocationSn,
         'warehouseSn': row.warehouseSn