lilei 2 vuotta sitten
vanhempi
commit
381da031f2

+ 8 - 0
src/api/sendBill.js

@@ -15,6 +15,14 @@ export const sendBillUpdate = params => {
     method: 'post'
   })
 }
+// 删除出库单修改发货状态
+export const deleteSendBillStockOut = params => {
+  return axios({
+    url: '/sendBill/deleteSendBillStockOut',
+    data: params,
+    method: 'post'
+  })
+}
 // 获取客户信息
 export const getCustomerInfo = params => {
   return axios({

+ 7 - 5
src/views/salesManagement/outboundOrder/selectGlOrderModal.vue

@@ -17,7 +17,7 @@
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
                 <a-form-item label="业务单号">
-                  <a-input v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
+                  <a-input v-model.trim="queryParam.outBizSubNo" allowClear placeholder="请输入业务单号"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -60,9 +60,11 @@
                 v-if="!record.checked"
                 @click="handleChoose(record)"
               >选择</a-button>
-              <span style="color:green;" v-else>已选</span>
+              <span style="color:#55aa00;" v-else>已选</span>
             </div>
-            <span v-else>--</span>
+            <span style="color:#55aa00;" v-else>
+              {{ record.checked?'已选':'--' }}
+            </span>
           </template>
         </s-table>
       </div>
@@ -100,7 +102,7 @@ export default {
       spinning: false,
       handlePlData: [],
       queryParam: {
-        outBizNo: '',
+        outBizSubNo: '',
         demanderName: '',
         receiverSn: undefined,
         outBizTypeList: ['SALES', 'ALLOCATE']
@@ -180,7 +182,7 @@ export default {
     // 重置
     resetSearchForm () {
       this.queryParam = {
-        outBizNo: '',
+        outBizSubNo: '',
         demanderName: '',
         receiverSn: undefined,
         outBizTypeList: ['SALES', 'ALLOCATE']

+ 19 - 8
src/views/salesManagement/outboundOrder/sendGoodModal.vue

@@ -212,7 +212,7 @@ import moment from 'moment'
 import locale from 'ant-design-vue/es/date-picker/locale/zh_CN'
 import { STable, VSelect } from '@/components'
 import selectGlOrderModal from './selectGlOrderModal.vue'
-import { sendBillInsert, sendBillFindBySn, sendBillUpdate } from '@/api/sendBill'
+import { sendBillInsert, sendBillFindBySn, sendBillUpdate, deleteSendBillStockOut } from '@/api/sendBill'
 export default {
   name: 'SendGoodModal',
   components: { STable, VSelect, selectGlOrderModal },
@@ -319,9 +319,22 @@ export default {
     },
     // 删除出库单
     delStockOutList (row) {
-      const i = this.sendBillStockOutList.findIndex(item => row.stockOutSn == item.stockOutSn)
-      this.sendBillStockOutList.splice(i, 1)
-      this.getProductTotal()
+      const ri = this.sendBillStockOutList.findIndex(item => row.stockOutSn == item.stockOutSn)
+      // 新加的
+      if (row.id) {
+        this.sendBillStockOutList.splice(ri, 1)
+        this.getProductTotal()
+      } else {
+        // 删除后修改发货状态
+        this.spinning = true
+        deleteSendBillStockOut({ stockOutSn: row.stockOutSn, sendBillSn: this.form.sendBillSn }).then(res => {
+          if (res.status == 200) {
+            this.sendBillStockOutList.splice(ri, 1)
+            this.getProductTotal()
+          }
+          this.spinning = false
+        })
+      }
     },
     // 编辑
     getDetail (data) {
@@ -375,7 +388,8 @@ export default {
     // 计算运费合计
     getTotalSendAmount () {
       let ret = 0
-      this.tableData.map(item => {
+      this.tableData.map((item, i) => {
+        item.no = i + 1
         ret = ret + Number(item.totalAmount || 0)
       })
       this.form.totalSendAmount = ret.toFixed(2)
@@ -389,9 +403,6 @@ export default {
     // 删除
     handleDel (row, index) {
       this.tableData.splice(index, 1)
-      this.tableData.map((item, i) => {
-        item.no = i + 1
-      })
       this.getTotalSendAmount()
     },
     // 添加

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.183:8602/ocs-admin',
+        target: 'http://192.168.0.215:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
+        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,
         changeOrigin: true,
         pathRewrite: {