12 İşlemeler b5ddf2ec87 ... c9a8b5212f

Yazar SHA1 Mesaj Tarih
  peter c9a8b5212f change: 企业微信货物申请直发.样式调整. 2 ay önce
  peter 23c421012e change: 企业微信货物直发申请.不再处理Package_not_complate数据. 2 ay önce
  peter 29168a5a01 change: 企业微信货物申请直发.增加直发类型表单项. 2 ay önce
  peter 81d7cdf282 fix: 创建PO.样式修正. 2 ay önce
  peter 66c34cb6f8 change: indent申请sku对话框补充loading逻辑. 2 ay önce
  peter bf0d5cd51a fix: 导出pdf文件名称修正. 2 ay önce
  peter 92b6e43248 change: 文案调整. 2 ay önce
  peter f18b2b6f40 change: 创建PO. 样式调整. 2 ay önce
  peter 308ba622a6 feat: 创建PO.新增产品部首选供应商功能. 2 ay önce
  peter 6ba5f26bde change: 创建PO.快速选择供应商Frequently Used Supplier调整. 2 ay önce
  peter 5072be6fc7 change: 创建PO. 产品表格行数据填充SO_Line_Item_Id字段. 2 ay önce
  peter 52eefae58f feat: 创建PO.根据所选供应商currency变更页面表单currency. 2 ay önce

+ 1 - 0
src/interface.ts

@@ -39,6 +39,7 @@ export interface IProductItem {
   candidate: IProduct[]
   Warehouse?: string
   CF_Product_Type?: string
+  SO_Line_Item_Id?: string
   [key: string]: number | string | IProduct | IProduct[] | undefined
 }
 export interface IForm {

+ 2 - 2
src/pages/indent-manage/indent/components/exportQuota2.vue

@@ -412,8 +412,8 @@ const getFreightType = (row: any) => {
 const generatePDF = () => {
   downloadPDF({
     content: document.getElementById('pdfTarget')?.outerHTML,
-    title: 'test_pdf',
-    create_time: '',
+    title: productInfo.product_name || '_',
+    create_time: '_',
   }).then((res: any) => {
     console.log(res, 'res pdf')
     if (res.result?.length) {

+ 3 - 0
src/pages/indent-manage/indent/components/skuApply.vue

@@ -11,6 +11,7 @@
     >
       <el-form
         ref="formRef"
+        v-loading="loading"
         label-width="90px"
         :model="form"
         :rules="rules"
@@ -42,6 +43,7 @@
       <template #footer>
         <div class="flex justify-center items-center">
           <el-button
+            :loading="loading"
             type="primary"
             size="small"
             @click="checkForm(formRef)"
@@ -49,6 +51,7 @@
             确定
           </el-button>
           <el-button
+            :loading="loading"
             type=""
             size="small"
             @click="close"

+ 1 - 0
src/pages/purchase-order/const.ts

@@ -115,6 +115,7 @@ export const emptyProductItem = {
   Warehouse: '',
   // 用来区分是否 库存商品, 是则需要将库存选项设置为必选项
   CF_Product_Type: '',
+  SO_Line_Item_Id: '',
 }
 
 export const getPath = function (path: string) {

+ 93 - 26
src/pages/purchase-order/edit.vue

@@ -105,10 +105,12 @@
             </el-form-item>
             <el-form-item
               v-if="recommandVendor.length"
-              label="Suggest Supplier"
-              label-width="130px"
+              label="Frequently Used Supplier"
+              label-position="right"
+              label-width="180px"
             >
               <div class="flex flex-col items-start">
+                <!-- <div class="text-gray-400">最近10个PO的供应商列表</div> -->
                 <div
                   v-for="(item, index) in recommandVendor"
                   :key="index"
@@ -120,6 +122,66 @@
                 </div>
               </div>
             </el-form-item>
+
+            <div
+              v-show="preferSupplier.length"
+              class="pl-[12px]"
+            >
+              <div class="text-gray-400">
+                <span>Product Team Preferred Supplier</span>
+                <!-- <span class="text-sm">&nbsp;(单击供应商名称快速选中)</span> -->
+              </div>
+              <div
+                v-for="(item, index) in preferSupplier"
+                :key="item.sku"
+                class="flex text-sm"
+                :class="{
+                  'border border-gray-200 border-x-[0] border-t-[0] border-solid':
+                    index + 1 === preferSupplier.length,
+                }"
+              >
+                <div
+                  class="border border-solid border-gray-200 border-r-[0] border-b-[0] min-w-[100px] flex justify-center items-center"
+                >
+                  {{ item.sku }}
+                </div>
+                <div class="flex-auto flex flex-col">
+                  <div
+                    v-for="subItem in item.list"
+                    :key="subItem.id"
+                    :style="{
+                      backgroundColor:
+                        subItem.Supplier.id === form.currentVendor
+                          ? '#409eff'
+                          : '#fff',
+                      color:
+                        subItem.Supplier.id === form.currentVendor
+                          ? '#fff'
+                          : '#333',
+                    }"
+                    class="border border-solid border-gray-200 border-b-[0] p-[6px] hover:bg-sky-100"
+                  >
+                    <el-tooltip
+                      placement="right"
+                      :content="subItem.Note"
+                      :disabled="!subItem.Note"
+                    >
+                      <span
+                        class="cursor-pointer"
+                        @click="quickSelectSupplier(subItem.Supplier)"
+                      >
+                        <span>
+                          {{ subItem.Supplier.name }}
+                        </span>
+                        <span v-if="subItem.Priority">
+                          &nbsp;-&nbsp;{{ subItem.Priority }}
+                        </span>
+                      </span>
+                    </el-tooltip>
+                  </div>
+                </div>
+              </div>
+            </div>
           </div>
 
           <div class="layout-right flex-auto">
@@ -1362,6 +1424,7 @@ import {
   ElRadioGroup,
   ElRadio,
   ElMessageBox,
+  ElTooltip,
 } from 'element-plus'
 import type { FormInstance } from 'element-plus'
 import { ShoppingCart, FolderAdd, Switch } from '@element-plus/icons-vue'
@@ -1919,6 +1982,13 @@ watch(computedVendor, () => {
     computedVendor.value.Payment_Terms.length
   ) {
     form.value.Supplier_Payment_Terms = computedVendor.value.Payment_Terms
+    // 选择供应商后, 对应的currency赋值到界面的Currency选项.
+    const temp: any[] = vendorList.value.filter(
+      (i) => i.value === form.value.currentVendor,
+    )
+    if (temp.length) {
+      form.value.Currency = temp[0].Currency || 'CNY'
+    }
   }
 })
 
@@ -2105,11 +2175,7 @@ const p1 = request
 const route = useRoute()
 const soOwner = ref('')
 // 获取销售订单详情
-const p2 = request
-  .post('/common/getSalesOrdersData', { id: route.params.id })
-  .then((response) => {
-    return response
-  })
+const p2 = request.post('/common/getSalesOrdersDatV7', { id: route.params.id })
 
 // 获取对 该so对应客户的标注 并弹窗提醒
 const getAccountsData = async (id: string) =>
@@ -2205,7 +2271,7 @@ const p3 = request
       currentCompany.value = 'PC'
     }
   })
-
+const preferSupplier = ref([] as any[])
 Promise.all([p1, p2, p3, getAccountsData])
   .then((array: any[]) => {
     // p2的数据处理逻辑从原本的p2then移动到这里处理.
@@ -2224,13 +2290,9 @@ Promise.all([p1, p2, p3, getAccountsData])
     form.value.Reference = res.Reference || ''
     form.value.Artwork_Link = res.Artwork_Link || ''
     let temp = []
-    if (res.details) {
-      temp = res.details.filter(
-        (item: any) => !productBlackList.includes(item.product_id),
-      )
-    } else if (res.Product_Details) {
-      temp = res.Product_Details.filter(
-        (item: any) => !productBlackList.includes(item.product.id),
+    if (res.Ordered_Items) {
+      temp = res.Ordered_Items.filter(
+        (item: any) => !productBlackList.includes(item.Product_Name.id),
       )
     }
 
@@ -2238,31 +2300,36 @@ Promise.all([p1, p2, p3, getAccountsData])
     form.value.productList = []
     recommandVendor.value = []
     temp.forEach((item: any) => {
-      getProductData(item.product.id).then((ctx) => {
+      getProductData(item.Product_Name.id).then((ctx) => {
         console.log(ctx, 'product ctx')
         form.value.productList.push(
           Object.assign({}, emptyProductItem, {
             candidate: [
               {
-                Product_Code: item.product_Product_Code,
-                label: item.product.name,
-                value: item.product.id,
+                Product_Code: item.Product_Name.Product_Code,
+                label: item.Product_Name.name,
+                value: item.Product_Name.id,
               },
             ],
-            Product_Code: item.product.Product_Code,
-            id: item.product.id,
-            name: item.product.name,
-            label: item.product.name,
-            value: item.product.id,
-            desc: item.product_description || '',
-            quantity: Number(item.quantity),
+            Product_Code: item.Product_Name.Product_Code,
+            id: item.Product_Name.id,
+            name: item.Product_Name.name,
+            label: item.Product_Name.name,
+            value: item.Product_Name.id,
+            desc: item.Description || '',
+            quantity: Number(item.Quantity),
             requirement:
               userInfo.value.Organization === 'PrimePac'
                 ? '产品名称:\n尺寸:\n材质:\n工艺:\n颜色:\n其他备注:'
                 : ctx.CF3 || '',
             CF_Product_Type: ctx.CF_Product_Type,
+            SO_Line_Item_Id: item.id,
           }),
         )
+        preferSupplier.value.push({
+          sku: item.Product_Name.Product_Code || '-',
+          list: ctx.Preferred_Supplier.slice() || [],
+        })
       })
     })
   })

+ 29 - 11
src/pages/wecom-approval/index.vue

@@ -84,6 +84,21 @@
             ></el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item
+          prop="Sample_package"
+          label="直发类型"
+        >
+          <el-radio-group v-model="form.Sample_package">
+            <el-radio
+              label="Sample"
+              :value="true"
+            ></el-radio>
+            <el-radio
+              label="Bulk Production"
+              :value="false"
+            ></el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item
           prop="yunshu"
           label="运输方式"
@@ -509,6 +524,7 @@ const form = ref({
   goods: [] as any[],
   files: [] as { file_id: string; name: string }[], // 附件
   useField: '',
+  Sample_package: '',
 })
 const rules = ref<FormRules>({
   creator_userid: [{ required: true, message: '必填项', trigger: 'blur' }],
@@ -520,6 +536,7 @@ const rules = ref<FormRules>({
   huoyun: [{ required: true, message: '必填项', trigger: 'blur' }],
   huodai: [{ required: true, message: '必填项', trigger: 'blur' }],
   trans: [{ required: true, message: '必填项', trigger: 'blur' }],
+  Sample_package: [{ required: true, message: '必填项', trigger: 'blur' }],
 })
 const locationList = [
   {
@@ -821,15 +838,15 @@ request
     const d = res.data.result
     if (res.status === 200 && res.data.code === 1) {
       soData.value = d
-      if (d.Package_not_complate === true) {
-        ElNotification({
-          duration: 0,
-          type: 'error',
-          title: '出错啦!',
-          message: 'Please confirm current package before a create a new one',
-        })
-        return false
-      }
+      // if (d.Package_not_complate === true) {
+      //   ElNotification({
+      //     duration: 0,
+      //     type: 'error',
+      //     title: '出错啦!',
+      //     message: 'Please confirm current package before a create a new one',
+      //   })
+      //   return false
+      // }
       firstName.value = (route.query.firstName as string) || ''
       form.value.creator_userid = (route.query.userName as string) || ''
       form.value.job_name = d.Contract_Title
@@ -1263,7 +1280,7 @@ input[type='number'] {
 <style lang="scss" scoped>
 .main-content {
   background-color: #fff;
-  padding: 12px 40px 12px;
+  padding: 0 40px 12px;
   width: 1000px;
   min-width: 1000px;
   min-height: 100vh;
@@ -1273,7 +1290,7 @@ input[type='number'] {
     0 0.5em 1em rgba(0, 0, 0, 0.6);
 }
 .logo-area {
-  padding: 12px 0 12px;
+  padding: 0 0 12px;
   img {
     position: relative;
     left: -16px;
@@ -1281,6 +1298,7 @@ input[type='number'] {
   }
 }
 .page-title {
+  margin-top: 18px;
   font-size: 24px;
   font-weight: 500;
   color: #222;