howie 3 éve
szülő
commit
b53d27ec84

+ 2 - 2
src/views/supply/apply/components/apply_detail.vue

@@ -33,11 +33,11 @@
             <div class="label">仓库</div>
             <div class="value">{{detailData.correspondName}}</div>
           </el-col>
-            <el-col :span="12" class="item">
+            <el-col :span="16" class="item">
             <div class="label">文件编号</div>
             <div class="value">{{detailData.itemFileNo}}</div>
           </el-col>
-          <el-col :span="16" class="item">
+          <el-col :span="24" class="item">
             <div class="label">备注</div>
             <div class="value">
               <!-- {{detailData.remark}} -->

+ 1 - 1
src/views/supply/policy/components/retail_form.vue

@@ -1853,7 +1853,7 @@ export default {
             type: 2, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList,
             policyId: this.policyId,
-            fileNum:this.mainForm.fileNum
+            fileNo:this.mainForm.fileNum
           }
           console.log(params)
           if (this.listItem) {

+ 35 - 5
src/views/supply/sales/components/sales_detail.vue

@@ -64,7 +64,22 @@
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
+
+            <template slot-scope="scope">
+                  <template v-if="edit">
+                   <el-input
+                    v-model="scope.row.refundableQty"
+                  placeholder="请输入数量"
+              ></el-input>
+
+                  </template>
+                 <template>
+                  {{refundableQty}}
+                 </template>
+            </template>
+
+          </el-table-column>
           <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.price | numToFixed }}
@@ -107,19 +122,20 @@
       </div>
     </div>
 
-
-
+    <div style="margin:10px">
+    <el-button type="primary" @click="updateNum">保存</el-button>
+</div>
   </div>
 </template>
 
 <script>
 import print from 'vue-print-nb'
-import { getDetail } from "@/api/supply/sales";
+import { getDetail ,updateNum} from "@/api/supply/sales";
 
 export default {
   name: 'SalesDetail',
   componentName: 'SalesDetail',
-  props: ['listItem'],
+  props: ['listItem','edit'],
   directives: {
     print
   },
@@ -153,7 +169,21 @@ export default {
     goBack() {
       this.$emit('backListFormDetail');
     },
+     updateNum(){
+      this.detailData.saleOrderData.forEach(item => {
+          item.invoiceNum = +item.refundableQty
+      });
+      updateNum({
+        ...this.detailData
+      }).then(res=>{
+        this.$successMsg("修改成功");
+        this.$parent.edit = false
+         this.goBack();
+        this.$parent.getList();
+      })
 
+
+    },
     // 获取详情
     getDetail() {
       getDetail({id: this.listItem.id}).then(res => {

+ 6 - 23
src/views/supply/sales/sales_list.vue

@@ -365,7 +365,8 @@
                 <el-button type="text" @click="toDetail(scope.row)"
                   >详情</el-button
                 >
-                <el-button type="text" v-if="scope.row.type==2 && scope.row.examineStatus!=OK"  @click="centerDialogVisible=true,qty = scope.row.invoiceNum "
+                <el-button type="text" v-if="scope.row.type==2 && scope.row.examineStatus!=OK"
+                @click="toDetail(scope.row),edit = true"
                   >编辑</el-button
                 >
                 <el-button
@@ -410,20 +411,7 @@
     </div>
 
 
-<el-dialog
-  :visible.sync="centerDialogVisible"
-  width="30%"
-  center>
 
-      <el-input
-          v-model="qty"
-                  placeholder="请输入数量"
-                ></el-input>
-  <span slot="footer" class="dialog-footer">
-    <el-button @click="centerDialogVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateNum">确 定</el-button>
-  </span>
-</el-dialog>
     <ExamineDialog
       :isShow.sync="isShowExamineDialog"
       :examineForm.sync="examineForm"
@@ -431,6 +419,7 @@
 
     <SalesDetail
       :listItem="queryItem"
+      :edit ='edit'
       v-if="isShowDetail"
       @backListFormDetail="backList"
     />
@@ -512,6 +501,7 @@ export default {
         // { label: '审核驳回', value: 'FAIL' },,
       ],
 centerDialogVisible:false,
+cid:'',
       queryItem: {},
       isShowDetail: false,
       isShowExamine: false,
@@ -605,15 +595,8 @@ centerDialogVisible:false,
         this.listLoading = false;
       });
     },
-    updateNum(){
-      updateNum({
-        invoiceNum:this.qty,
-        refundableQty:this.qty
-      }).then(res=>{
-        this.$successMsg("修改成功");
-      })
-      this.centerDialogVisible = false
-    },
+
+
     updateReceipt() {
 
     if (!this.value1) {