From 8d7b65338910b362265b2f2f810b02c063866bd6 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期六, 12 七月 2025 15:40:05 +0800
Subject: [PATCH] 1.采购验退

---
 H5/Cgyt.aspx  |   32 +++++++--------
 H5/Js/Cgyt.js |   48 ++++++++++++++++++++----
 2 files changed, 55 insertions(+), 25 deletions(-)

diff --git a/H5/Cgyt.aspx b/H5/Cgyt.aspx
index d96a569..d0fc617 100644
--- a/H5/Cgyt.aspx
+++ b/H5/Cgyt.aspx
@@ -86,19 +86,19 @@
                     <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
         <van-col span="8" class="text-left padding-left">瑙勬牸</van-col>
              <%--<van-col span="4">闇�姹傛暟</van-col>--%>
-            <van-col span="5">鐗╂枡鍒嗗尯</van-col>
-            <van-col span="3">宸插叆搴撴暟</van-col>
+<%--            <van-col span="5">鐗╂枡鍒嗗尯</van-col>--%>
+            <van-col span="8">宸叉壂鎬绘暟</van-col>
         </van-row>
         <van-row  v-for="(itm,index) in ItemDetail" :key="index">
                    <van-col span="8" class="text-left padding-left">
-            <div class="blue-text">{{itm.itemNo}}</div>
-            <div>{{itm.itemName}}</div>
+            <div class="blue-text">{{itm.item_no}}</div>
+            <div>{{itm.item_name}}</div>
         </van-col>
         <van-col span="8" class="text-left padding-left">
-            <div>{{itm.itemModel}}</div>
+            <div>{{itm.item_model}}</div>
         </van-col>
-           <van-col span="3" class="blue-text">{{itm.fQty}}</van-col>
-            <van-col span="5" class="blue-text">{{itm.fQty}}</van-col>
+<%--           <van-col span="3" class="blue-text"></van-col>--%>
+            <van-col span="8" class="blue-text">{{itm.quantity}}</van-col>
        </van-row>
    </van-tab>
 
@@ -106,21 +106,19 @@
          <van-row>
             <van-col span="8" class="text-left padding-left">鏉$爜</van-col>
              <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
-             <van-col span="4">鏁伴噺</van-col>
-            <van-col span="4">搴撲綅缂栫爜</van-col>
+             <van-col span="8">鏁伴噺</van-col>
         </van-row>
         <van-row  v-for="(itm,index) in tableData" :key="index">
            <van-col span="8" class="text-left padding-left">
-                <div>{{itm.barcode}}</div>
+                <div>{{itm.iteM_BARCODE}}</div>
            </van-col>
             <van-col span="8" class="text-left padding-left">
-            <div>{{itm.itemNo}}</div>
-            <div>{{itm.itemName}}</div>
+            <div>{{itm.item_no}}</div>
+            <div>{{itm.item_name}}</div>
             </van-col>
-            <van-col span="4">
-                <div>{{itm.fQty}}</div>
+            <van-col span="8">
+                <div>{{itm.quantity}}</div>
             </van-col>
-           <van-col span="4">{{itm.kw}}</van-col>
        </van-row>
    </van-tab>
 </van-tabs>
@@ -146,7 +144,7 @@
               <van-button 
                 block 
                 type="danger" 
-                @click="submit"
+                @click="deleteCgyt"
                 :loading="ttrre2"
                 loading-text="鍔犺浇涓�..."
               >鍒犻櫎閫�鏂�</van-button>
@@ -162,5 +160,5 @@
     <%--<comback ></comback>--%>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/Cgyt.js?<%=0001000 %>"></script>
+    <script src="Js/Cgyt.js?<%=0001000111 %>"></script>
 </asp:Content>
diff --git a/H5/Js/Cgyt.js b/H5/Js/Cgyt.js
index be2d7e1..b39bf6f 100644
--- a/H5/Js/Cgyt.js
+++ b/H5/Js/Cgyt.js
@@ -65,6 +65,9 @@
                         that.formData.itemNo = json.data.tbMesItems.itemNo;
                         that.formData.itemName = json.data.tbMesItems.itemName;
                         that.formData.itemModel = json.data.tbMesItems.itemModel;
+                        that.ytdh = "";
+                        that.ItemDetail = [];
+                        that.tableData = [];
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -83,25 +86,54 @@
 
 
         handleSubmit() {
-            if (this.ttrre) {
+            if (this.isLoading) {
                 return;
             }
 
             var that = this;
-            that.ttrre = true;
-            that.AxiosHttp("post", 'MesBarCF/EditModelSubmit', {
-                guid: that.formData.guid
-            }, true, 1).then(function (res1) {
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesCgthSq/ScanCgyt', {
+                barcode: that.formData.barcode,
+                userName: that.userInfo.loginAccount,
+            }, true, 0).then(function (res1) {
+                if (res1.status == 0) {
+                    that.$notify({ type: 'success', message: res1.data.tbBillList.msg });
+                    that.ytdh = res1.data.tbBillList.ytdh;
+                    that.ItemDetail = res1.data.ytItem;
+                    that.tableData = res1.data.ytBarInfo;
+                }
+                else {
+                    that.$toast.fail(res1.message);
+                }
+                that.isLoading = false
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.isLoading = false
+                console.log(error);
+            });
+        },
+
+        deleteCgyt() {
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesCgthSq/deleteCgyt', {
+                ytdh: that.ytdh,
+                userName: that.userInfo.loginAccount,
+            }, true, 0).then(function (res1) {
                 if (res1.rtnData.outSum == 1) {
                     that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' });
                     that.init();
                 } else {
                     that.$toast.fail(res1.rtnData.outMsg);
                 }
-                that.ttrre = false
+                that.isLoading = false
             }).catch(function (error) {
                 that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                that.ttrre = false
+                that.isLoading = false
                 console.log(error);
             });
         },
@@ -115,7 +147,7 @@
             that.ttrre = true;
             that.AxiosHttp("post", 'FqcManager/EditModelSubmit', {
                 guid: that.formData.guid
-            }, true, 1).then(function (res1) {
+            }, true, 0).then(function (res1) {
                 if (res1.rtnData.outSum == 1) {
                     that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' });
                     that.init();

--
Gitblit v1.9.3