zhouhao 2 lat temu
rodzic
commit
4ba8b414b7

+ 2 - 0
src/views/sales_control/adjust_warehouse.vue

@@ -102,6 +102,7 @@ export default {
                 审批
               </el-button>
             ) : null}
+            {row.examineStatus != 'OK' ? (
             <el-popconfirm
               onOnConfirm={() => {
                 deleteCustomerStockOrder({ id: row.id }).then(res => {
@@ -113,6 +114,7 @@ export default {
             >
               <el-button slot="reference" size="mini" type="text">删除</el-button>
             </el-popconfirm>
+            ) : null}
           </div>
         )
       }

+ 5 - 1
src/views/sales_control/components/WarehouseForm.vue

@@ -146,10 +146,14 @@ export default {
       for (let i = 0; i < this.dataList.length; i++) {
         this.dataList[i].id = ''
         this.dataList[i].directFlag = this.dataList[i].flag
-        if (Number(this.dataList[i].stockChangeQty) < 0 || !this.dataList[i].stockChangeQty) {
+        if (Number(this.dataList[i].stockChangeQty) < 0) {
           this.$errorMsg(`第${i + 1}产品数量有误`)
           return
         }
+        if (Number(this.dataList[i].stockChangeQty) == 0 && this.dataList[i].directFlag ==0) {
+          this.$errorMsg(`第${i + 1}产品数量为0时发生方向只能做增加`)
+          return
+        }
       }
       const params = {
         ...this.$refs.header.screenForm,

+ 9 - 9
src/views/sales_control/sales_management/components/customer_sales_details.vue

@@ -27,15 +27,15 @@
         <el-radio label="1" v-model="row.flag">增加</el-radio>
         <el-radio label="-1" v-model="row.flag">减少</el-radio>
       </template>
-      <template v-slot:operation="{item:{row,$index}}">
-        <el-popconfirm
-          style="margin-left: 10px"
-          title="删除?"
-          @onConfirm="handleDel(row,$index)"
-        >
-          <el-button slot="reference" type="text" size="mini">删除</el-button>
-        </el-popconfirm>
-      </template>
+<!--      <template v-slot:operation="{item:{row,$index}}">-->
+<!--        <el-popconfirm-->
+<!--          style="margin-left: 10px"-->
+<!--          title="删除?"-->
+<!--          @onConfirm="handleDel(row,$index)"-->
+<!--        >-->
+<!--          <el-button slot="reference" type="text" size="mini">删除</el-button>-->
+<!--        </el-popconfirm>-->
+<!--      </template>-->
       <!--      <div>-->
       <!--        <h5>物流信息</h5>-->
       <!--        <div class="diy-table-1">-->

+ 11 - 11
src/views/sales_control/sales_management/components/return_sales_details.vue

@@ -6,8 +6,8 @@
 
       <template #events>
         <div>
-          <el-button type="primary" v-if="details.status==1||details.status==2" size="mini" @click="handleInform(2)">通知退货</el-button>
-          <el-button size="mini" v-if="details.status==3">撤销发货</el-button>
+          <el-button type="primary" v-if="details.status==1" size="mini" @click="handleInform(2)">通知退货</el-button>
+          <el-button size="mini" v-if="details.status==2">撤销发货</el-button>
         </div>
       </template>
 
@@ -15,15 +15,15 @@
         <el-radio label="1" v-model="row.flag">增加</el-radio>
         <el-radio label="-1" v-model="row.flag">减少</el-radio>
       </template>
-      <template v-slot:operation="{item:{row,$index}}">
-        <el-popconfirm
-          style="margin-left: 10px"
-          title="删除?"
-          @onConfirm="handleDel(row,$index)"
-        >
-          <el-button slot="reference" type="text" size="mini">删除</el-button>
-        </el-popconfirm>
-      </template>
+<!--      <template v-slot:operation="{item:{row,$index}}">-->
+<!--        <el-popconfirm-->
+<!--          style="margin-left: 10px"-->
+<!--          title="删除?"-->
+<!--          @onConfirm="handleDel(row,$index)"-->
+<!--        >-->
+<!--          <el-button slot="reference" type="text" size="mini">删除</el-button>-->
+<!--        </el-popconfirm>-->
+<!--      </template>-->
     </sales-table>
     <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
                   @confirm="confirm"

+ 3 - 1
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -188,8 +188,8 @@ export default {
       if (!this.detailsId) {
         this.details = this.dataList[0]
         this.details.customerOrderNo = this.dataList[0].id
-        this.detailsId = this.detailsId
       }
+      this.detailsId = this.detailsId
       this.customerNumber = this.dataList[0].customerNumber
       this.dialogVisible = false
       this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
@@ -242,6 +242,7 @@ export default {
       for (let i = 0; i < this.dataList.length; i++) {
         this.dataList[i].id = ''
         this.dataList[i].directFlag = this.dataList[i].flag
+        this.dataList[i].qty = this.dataList[i].refundQty
         if (Number(this.dataList[i].refundQty) < 0 || !this.dataList[i].refundQty) {
           this.$errorMsg(`第${i + 1}产品退货数量有误`)
           return
@@ -279,6 +280,7 @@ export default {
         this.$parent.pageType = 0
       })
     },
+
     onReset() {
       Object.assign(this.$data, this.$options.data())