cz 1 year ago
parent
commit
c826ae37b3

+ 4 - 1
public/index.html

@@ -37,7 +37,10 @@
     }
   </script>
   <!-- 引入uni-app sdk -->
-  <script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+  <!-- <script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script> -->
+  <!-- <script src="../src/hybrid_html_uni.webview.1.5.5.js"></script> -->
+  <script type="text/javascript"
+    src="https://gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/hybrid/html/uni.webview.1.5.5.js"></script>
 </head>
 <header>
 

File diff suppressed because it is too large
+ 0 - 0
src/hybrid_html_uni.webview.1.5.5.js


+ 38 - 37
src/views/JXSK/afterSales/edit.vue

@@ -38,20 +38,20 @@
               <template #title>
                 <div>
                   <van-icon name="warning-o" v-if="
-                      submitData[item.productId].quantity &&
-                      submitData[item.productId].remark &&
-                      submitData[item.productId].fileList.length > 0
+                      submitData[item.id].quantity &&
+                      submitData[item.id].remark &&
+                      submitData[item.id].fileList.length > 0
                     " color="#ee0a24" style="margin-right: 5px" />
 
                   {{ item.productName }}
                 </div>
               </template>
               <div>
-                <van-field v-model="submitData[item.productId].quantity" label="售后数量" type="digit" placeholder="请输入" label-align="top" />
-                <van-field v-model="submitData[item.productId].remark" label="售后说明" type="textarea" placeholder="请输入" label-align="top" />
+                <van-field v-model="submitData[item.id].quantity" label="售后数量" type="digit" placeholder="请输入" label-align="top" />
+                <van-field v-model="submitData[item.id].remark" label="售后说明" type="textarea" placeholder="请输入" label-align="top" />
                 <van-field name="uploader" label="现场照片">
                   <template #input>
-                    <van-uploader v-model="submitData[item.productId].fileList" :after-read="afterRead" multiple :max-size="5 * 1024 * 1024"
+                    <van-uploader v-model="submitData[item.id].fileList" :after-read="afterRead" multiple :max-size="5 * 1024 * 1024"
                                   @oversize="onOversize" />
                   </template>
                 </van-field>
@@ -351,7 +351,8 @@ const getDetails = async (id) => {
     if (status == 0) {
       for (let i = 0; i < res.data.bomDetailList.length; i++) {
         const e = res.data.bomDetailList[i];
-        submitData.value[e.productId] = {
+        submitData.value[e.id] = {
+          bomDetailId: e.id,
           accessoriesId: e.productId,
           productName: e.productName,
           quantity: null,
@@ -364,7 +365,8 @@ const getDetails = async (id) => {
       let arr = res.data.bomDetailList.map((x) => x.afterSalesRecordDetail.id);
       for (let i = 0; i < res.data.bomDetailList.length; i++) {
         const e = res.data.bomDetailList[i];
-        submitData.value[e.productId] = {
+        submitData.value[e.id] = {
+          bomDetailId: e.id,
           accessoriesId: e.productId,
           productName: e.productName,
           quantity: e.afterSalesRecordDetail.quantity,
@@ -380,13 +382,11 @@ const getDetails = async (id) => {
         const e = res.data.bomDetailList[i];
         for (const key in fileObj.data) {
           if (e.afterSalesRecordDetail.id == key) {
-            submitData.value[e.productId].fileList = fileObj.data[key].map(
-              (item) => ({
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              })
-            );
+            submitData.value[e.id].fileList = fileObj.data[key].map((item) => ({
+              raw: item,
+              name: item.fileName,
+              url: item.fileUrl,
+            }));
           }
         }
       }
@@ -436,8 +436,9 @@ onMounted(() => {
   if (route.query.id) {
     getDetails(route.query.id);
     if (route.query.status == 1) {
-      formOption.hiddenSubmitBtn = true; //隐藏提交按钮
-      formOption.readonly = true;
+      formOptionOne.hiddenSubmitBtn = true; //隐藏提交按钮
+      formOptionOne.readonly = true;
+      formOptionOne.btnConfig.isNeed = false;
     }
   }
 });
@@ -489,26 +490,26 @@ const onSubmit = async () => {
   });
 };
 
-const handleClickItem = (item) => {
-  if (item.afterSalesRecordDetail || route.query.status == 0) {
-    proxy.$router.push({
-      path: "jxskAfterSalesEditItem",
-      query: {
-        data: JSON.stringify({
-          bomDetailList: [item],
-          code: formData.data.code,
-          productName: formData.data.productName,
-          productSn: formData.data.productSn,
-          remark: item.afterSalesRecordDetail
-            ? item.afterSalesRecordDetail.remark
-            : "",
-          fileList: [],
-          status: route.query.status,
-        }),
-      },
-    });
-  }
-};
+// const handleClickItem = (item) => {
+//   if (item.afterSalesRecordDetail || route.query.status == 0) {
+//     proxy.$router.push({
+//       path: "jxskAfterSalesEditItem",
+//       query: {
+//         data: JSON.stringify({
+//           bomDetailList: [item],
+//           code: formData.data.code,
+//           productName: formData.data.productName,
+//           productSn: formData.data.productSn,
+//           remark: item.afterSalesRecordDetail
+//             ? item.afterSalesRecordDetail.remark
+//             : "",
+//           fileList: [],
+//           status: route.query.status,
+//         }),
+//       },
+//     });
+//   }
+// };
 
 const productData = ref([]);
 const getProductData = (keyword) => {

+ 10 - 8
src/views/JXSK/salesContract/add.vue

@@ -441,17 +441,19 @@ const getDict = () => {
 };
 
 const getProductData = (keyword) => {
-  proxy.post("/productInfo/page", { keyword, definition: "1" }).then((res) => {
-    productData.value = res.data.rows.map((x) => ({
-      label: x.name + ` (${x.spec})`,
-      value: x.id,
-    }));
-    formOption.btnConfig.listConfig[0].data = productData.value;
-  });
+  proxy
+    .post("/productInfo/page", { keyword, definition: "1", pageSize: 9999 })
+    .then((res) => {
+      productData.value = res.data.rows.map((x) => ({
+        label: x.name + ` (${x.spec})`,
+        value: x.id,
+      }));
+      formOption.btnConfig.listConfig[0].data = productData.value;
+    });
 };
 
 const getCustomerData = (keyword) => {
-  proxy.post("/customer/page", { keyword }).then((res) => {
+  proxy.post("/customer/page", { keyword, pageSize: 9999 }).then((res) => {
     customerData.value = res.data.rows.map((x) => ({
       label: x.name,
       value: x.id,

Some files were not shown because too many files changed in this diff