瀏覽代碼

change: cargo船货凑期.动态获取货物材质候选数据.

peter 1 天之前
父節點
當前提交
0253e3a6d2
共有 1 個文件被更改,包括 18 次插入1 次删除
  1. 18 1
      src/pages/cargo-consolidation-request/index.vue

+ 18 - 1
src/pages/cargo-consolidation-request/index.vue

@@ -812,7 +812,7 @@ let getSubList = (e: any = {}) => {
     })
     .finally(() => (loading.value = false))
 }
-
+// 货物材质候选数据
 const goodMaterialOption = ref([
   'Cotton 棉',
   'Iron 铁',
@@ -829,6 +829,23 @@ const goodMaterialOption = ref([
   'Rubber 橡胶',
   'Stainless Steel 不锈钢',
 ])
+// 动态获取货物材质候选数据
+let getGoodMaterialOption = () => {
+  request
+    .post('/common/getWebsiteSubform', { id: '4791186000359651051' })
+    .then((resp: any) => {
+      // console.log(resp, 'res')
+      const res = resp.data.result || {}
+      if (Array.isArray(res.data) && res.data.length) {
+        console.log(res.data, 'res.data')
+        goodMaterialOption.value =
+          res.data[0].Website_Subform.map(
+            (i: any) => i.Website_Subform_Value,
+          ) || []
+      }
+    })
+}
+getGoodMaterialOption()
 
 const addBulkProduct = () => {
   let temp = cloneDeep(newLineTemplate)