002201 2 жил өмнө
parent
commit
52ad267682

+ 1 - 1
src/views/purchase/apply/add/column.js

@@ -31,7 +31,7 @@ export const FormColumns = [
     referName: "ORG_PARAM",
     valueKey: "name",
     dataMapping: {
-      puOrg: "code",
+      puOrg: "id",
       puOrgName: "name",
     },
     require: true,

+ 52 - 23
src/views/purchase/apply/edit/column.js

@@ -31,7 +31,7 @@ export const FormColumns = [
     referName: "ORG_PARAM",
     valueKey: "name",
     dataMapping: {
-      puOrg: "code",
+      puOrg: "id",
       puOrgName: "name",
     },
     require: true,
@@ -156,9 +156,11 @@ export const FormColumns = [
   {
     key: "status",
     title: "单据状态",
-    inputType: "Input",
+    inputType: "Select",
+    referName: "sys_status",
     disabled: true,
     readonly: true,
+    value: "0",
   },
 ];
 
@@ -171,20 +173,28 @@ export const TabColumns = [
         title: "物料名称",
         key: "materialName",
         inputType: "PopoverSelect",
-        width: 200,
+        width: 300,
         referName: "MATERIAL_PARAM",
         dataMapping: {
+          model: "model",
           material: "id",
           materialCode: "code",
           materialName: "name",
-          puUnit: "unitIdName",
+          unitName: "unitIdName",
+          puUnitName: "unitIdName",
           specification: "specification",
-          manufacturer: "manufacturerIdName",
+          manufacturer: "manufacturerId",
+          manufacturerName: "manufacturerIdName",
         },
+        require: true,
       },
       { title: "物料编码", key: "materialCode" },
       {
         title: "生产厂家",
+        key: "manufacturerName",
+      },
+      {
+        title: "生产厂家编码",
         key: "manufacturer",
       },
       {
@@ -199,10 +209,11 @@ export const TabColumns = [
         title: "单位名称",
         key: "unitName",
         inputType: "PopoverSelect",
-        width: 200,
+        width: 300,
         referName: "UNIT_PARAM",
         dataMapping: {
-          puUnit: "name",
+          unit: "code",
+          unitName: "name",
         },
       },
       {
@@ -213,10 +224,11 @@ export const TabColumns = [
         title: "采购单位名称",
         key: "puUnitName",
         inputType: "PopoverSelect",
-        width: 200,
+        width: 300,
         referName: "UNIT_PARAM",
         dataMapping: {
-          puUnit: "name",
+          puUnit: "code",
+          puUnitName: "name",
         },
       },
       {
@@ -227,7 +239,8 @@ export const TabColumns = [
         title: "采购换算率",
         key: "conversionRate",
         inputType: "InputNumber",
-        width: 200,
+        width: 300,
+        require: true,
       },
       {
         title: "税率%",
@@ -237,25 +250,28 @@ export const TabColumns = [
         dataMapping: {
           tax: "ntaxrate",
         },
-        width: 200,
+        width: 300,
+        require: true,
       },
       {
         title: "含税单价",
         key: "taxPrice",
         inputType: "InputNumber",
-        width: 200,
+        width: 300,
+        require: true,
       },
       {
         title: "无税单价",
-        key: "taxFreePrice",
+        key: "price",
         inputType: "ComputedInput",
-        width: 200,
+        width: 300,
         computed: (prop) => {
           const { tax, taxPrice } = prop;
           const newTax = Number(tax) / 100;
-          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
-          return taxFreePrice === "NaN" ? null : taxFreePrice;
+          const price = (taxPrice / (1 + newTax)).toFixed(8);
+          return price === "NaN" ? null : price;
         },
+        require: true,
       },
       {
         key: "currencyName",
@@ -276,18 +292,26 @@ export const TabColumns = [
         title: "价格有效期(起)",
         inputType: "DatePicker",
         valueFormat: "yyyy-MM-dd",
+        value: new Date(),
+        require: true,
       },
       {
         key: "periodEnd",
         title: "价格有效期(止)",
         inputType: "DatePicker",
         valueFormat: "yyyy-MM-dd",
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() < Date.now() + 3600 * 1000 * 24 * 365;
+          },
+        },
+        require: true,
       },
       {
         title: "客户名称",
         key: "customerName",
         inputType: "PopoverSelect",
-        width: 200,
+        width: 300,
         referName: "CUSTOMER_PARAM",
         dataMapping: {
           customer: "code",
@@ -299,18 +323,22 @@ export const TabColumns = [
         key: "customer",
       },
       {
+        title: "最近价格",
+        key: "recentlyPrice",
+      },
+      {
         title: "首次报批",
         key: "isApprovalFirst",
-        width: 200,
+        width: 300,
         inputType: "Select",
-        referName: "sys_yes_no",
+        referName: "is_effective",
       },
       {
         title: "价格调整",
         key: "isPriceAdjustment",
-        width: 200,
+        width: 300,
         inputType: "Select",
-        referName: "sys_yes_no",
+        referName: "is_effective",
       },
       {
         key: "priceType",
@@ -321,9 +349,10 @@ export const TabColumns = [
       {
         title: "配送价",
         key: "isDistributionPrice",
-        width: 200,
+        width: 300,
         inputType: "Select",
-        referName: "sys_yes_no",
+        referName: "is_effective",
+        require: true,
       },
       {
         title: "创建人名称",

+ 3 - 3
src/views/purchase/task/first-direct/index.vue

@@ -140,7 +140,7 @@ export default {
           :width="cItem.width || 200"
           show-overflow-tooltip
         >
-          <!-- <template slot-scope="scope">
+          <template slot-scope="scope">
             <el-input-number
               v-if="cItem.inputType === 'InputNumber'"
               v-model="scope.row[cItem.key]"
@@ -175,8 +175,8 @@ export default {
               :value="scope.row[cItem.key]"
               :options="dict.type[cItem.referName]"
             />
-            <span v-else>1{{ scope.row[cItem.key] }}</span>
-          </template> -->
+            <span v-else>{{ scope.row[cItem.key] }}</span>
+          </template>
         </el-table-column>
       </el-table>
     </div>