lhl 3 months ago
parent
commit
158be425e0
2 changed files with 5 additions and 5 deletions
  1. 4 4
      src/views/Erp/Purchase/PurchaseEdit.vue
  2. 1 1
      src/views/Erp/Want/Want.vue

+ 4 - 4
src/views/Erp/Purchase/PurchaseEdit.vue

@@ -231,7 +231,7 @@ const save = async (formEl: FormInstance | undefined) => {
         }) => {
           if (!item['product_num'] || item['product_num'] < 0) {
             ok = false
-            return ElMessage.error('请填写正确的要货商品数量')
+            return ElMessage.error('请填写正确的采购商品数量')
           } else {
             goods.push({
               product_id: item.id,
@@ -247,7 +247,7 @@ const save = async (formEl: FormInstance | undefined) => {
       console.log(ok, 'ok')
       if (!ok) return
       pData = {
-        type: selfBuild.wid?0:1,
+        type: selfBuild.wid ? 0 : 1,
         wid: selfBuild.wid,
         store_id: selfBuild.store_id,
         create_admin_id: selfBuild.create_admin_id || '',
@@ -279,7 +279,7 @@ const save = async (formEl: FormInstance | undefined) => {
         return ElMessage.error('请选择需要采购的商品')
       }
       pData = {
-        type:0,
+        type: 0,
         want_order_id: wantBuild.want_order_id,
         store_id: wantBuild.store_id,
         create_admin_id: wantBuild.create_admin_id || '',
@@ -288,7 +288,7 @@ const save = async (formEl: FormInstance | undefined) => {
         supplier_id: wantBuild.supplier_id || ''
       }
     }
-
+    console.log(pData,'pData')
     const res = await createPur(pData)
     if (res?.status == 200) {
       ElMessage.success('保存成功')

+ 1 - 1
src/views/Erp/Want/Want.vue

@@ -450,7 +450,7 @@ const searchSchema = reactive<FormSchema[]>([
     }
   },
   {
-    field: 'wid',
+    field: 'up_wid',
     label: '仓库',
     component: 'Select',
     value: '',