|
@@ -57,9 +57,12 @@
|
|
|
//产品名称
|
|
|
<template slot="cnameForm" slot-scope="{type,disabled}">
|
|
|
<span style="display:flex">
|
|
|
- <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small" filterable
|
|
|
- @change="cnameChange(goodsForm)">
|
|
|
- <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname"
|
|
|
+ <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small"
|
|
|
+ @change="cnameChange(goodsForm)">
|
|
|
+ <el-option
|
|
|
+ v-for="item in goodsoptions"
|
|
|
+ :key="item.itemId"
|
|
|
+ :label="item.cname"
|
|
|
:value="item.itemId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -251,12 +254,13 @@
|
|
|
</template>
|
|
|
//产品型号
|
|
|
<template slot="itemTypeForm" slot-scope="{type,disabled}">
|
|
|
- <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"
|
|
|
- size="small" @focus="itemTypeFocus(goodsForm)">
|
|
|
- <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-input v-model="goodsForm.itemType" placeholder="请输入内容"></el-input>
|
|
|
+<!-- <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"-->
|
|
|
+<!-- size="small" @focus="itemTypeFocus(goodsForm)">-->
|
|
|
+<!-- <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"-->
|
|
|
+<!-- :value="item.value">-->
|
|
|
+<!-- </el-option>-->
|
|
|
+<!-- </el-select>-->
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<!-- <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
|
|
@@ -304,14 +308,14 @@ import priceLibrary from "@/components/price-Library/main";
|
|
|
import propertyDialog from "@/components/property-dialog/main";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
import {
|
|
|
- delItem,
|
|
|
- getDeptLazyTree,
|
|
|
- getGoods,
|
|
|
- savePurchase,
|
|
|
- saveShipping,
|
|
|
- getSpecification,
|
|
|
- getPricebank,
|
|
|
- calculationDomesticFees
|
|
|
+ delItem,
|
|
|
+ getDeptLazyTree,
|
|
|
+ getGoods,
|
|
|
+ savePurchase,
|
|
|
+ saveShipping,
|
|
|
+ getSpecification,
|
|
|
+ getPricebank,
|
|
|
+ calculationDomesticFees, getPricebankAll
|
|
|
} from "@/api/basicData/customerInquiry";
|
|
|
import {
|
|
|
sum,
|
|
@@ -434,18 +438,21 @@ export default {
|
|
|
this.getWorkDicts("unit").then(res => {
|
|
|
this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
|
|
|
});
|
|
|
- getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
|
|
|
- if (res.data.data.total > 0) {
|
|
|
- this.goodsoptions = res.data.data.records;
|
|
|
- if (Math.ceil(res.data.data.total / 10) > 1) {
|
|
|
- for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
|
|
|
- getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
|
|
|
- this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res=>{
|
|
|
+ this.goodsoptions = res.data.data
|
|
|
+ })
|
|
|
+ // getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
|
|
|
+ // if (res.data.data.total > 0) {
|
|
|
+ // this.goodsoptions = res.data.data.records;
|
|
|
+ // if (Math.ceil(res.data.data.total / 10) > 1) {
|
|
|
+ // for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
|
|
|
+ // getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
|
|
|
+ // this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
methods: {
|
|
|
cellStyle() {
|
|
@@ -613,7 +620,7 @@ export default {
|
|
|
row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
|
|
|
row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
|
|
|
row.taxRate = 0;
|
|
|
- row.unit = 'PCS';
|
|
|
+ row.unit = e.unit;
|
|
|
row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
|
|
|
row.partsDescribe = null;
|
|
|
row.remarks = null;
|