|
@@ -284,13 +284,14 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="corpId" slot-scope="{ row, index }">
|
|
|
- <customer-dialog
|
|
|
- v-if="row.$cellEdit"
|
|
|
- v-model="row.corpName"
|
|
|
+ <crop-select
|
|
|
+ v-show="row.$cellEdit"
|
|
|
+ v-model="row.corpId"
|
|
|
:cropIndex="index"
|
|
|
- @getcorpId="getcorpId"
|
|
|
- ></customer-dialog>
|
|
|
- <span v-else>{{ row.corpName }}</span>
|
|
|
+ @getCorpData="rowCorpData"
|
|
|
+ corpType="GYS"
|
|
|
+ ></crop-select>
|
|
|
+ <span v-show="!row.$cellEdit">{{ row.corpName }}</span>
|
|
|
</template>
|
|
|
<template slot="purchaseAmount" slot-scope="{ row }">
|
|
|
<el-input
|
|
@@ -393,8 +394,8 @@
|
|
|
<el-col :span="5">
|
|
|
<div>
|
|
|
<el-scrollbar>
|
|
|
- <basic-container style="margin-top:45px">
|
|
|
- <avue-tree :option="treeOption" @node-click="nodeClick" />
|
|
|
+ <basic-container>
|
|
|
+ <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
|
|
|
</basic-container>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
@@ -435,11 +436,9 @@
|
|
|
></report-dialog>
|
|
|
<part-dialog
|
|
|
ref="part"
|
|
|
- @partOpen="partOpen()"
|
|
|
:partList="partList"
|
|
|
@importPart="importPart"
|
|
|
@partClosed="partClosed"
|
|
|
- @partReData="partReData"
|
|
|
/>
|
|
|
<price-library ref="library" @importLibray="importLibray" />
|
|
|
</div>
|
|
@@ -474,6 +473,7 @@ export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
+ treeStyle: "height:" + (window.innerHeight - 360) + "px",
|
|
|
itemtypeList: [],
|
|
|
configuration: {
|
|
|
multipleChoices: false,
|
|
@@ -662,8 +662,7 @@ export default {
|
|
|
prop: "exchangeRate",
|
|
|
span: 8,
|
|
|
slot: true,
|
|
|
- row: true,
|
|
|
- disabled: true
|
|
|
+ row: true
|
|
|
},
|
|
|
{
|
|
|
label: "箱型",
|
|
@@ -787,8 +786,6 @@ export default {
|
|
|
subLoading: false,
|
|
|
pageLoading: false,
|
|
|
showBut: true,
|
|
|
- partreData: null,
|
|
|
- partType: false,
|
|
|
partList: [],
|
|
|
goodsoptions: [],
|
|
|
priceTermsList: [],
|
|
@@ -860,8 +857,11 @@ export default {
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
|
},
|
|
|
- getCorpData(row){
|
|
|
- this.form.coefficient=row.coefficient
|
|
|
+ getCorpData(row) {
|
|
|
+ this.form.coefficient = row.coefficient;
|
|
|
+ },
|
|
|
+ rowCorpData(row) {
|
|
|
+ this.data[row.index].corpName = row.cname;
|
|
|
},
|
|
|
priceTermsChange(row) {
|
|
|
this.priceTermsList.forEach(e => {
|
|
@@ -884,10 +884,7 @@ export default {
|
|
|
if (!this.form.currency) {
|
|
|
return this.$message.error("请选择币别");
|
|
|
}
|
|
|
- this.$refs.library.init(this.partType, this.partreData != null);
|
|
|
- },
|
|
|
- rowCorpdata(row) {
|
|
|
- this.form.coefficient = row.coefficient;
|
|
|
+ this.$refs.library.init(false);
|
|
|
},
|
|
|
cnameChange(row) {
|
|
|
this.goodsoptions.forEach(e => {
|
|
@@ -901,10 +898,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- partReData(row) {
|
|
|
- this.partreData = row;
|
|
|
- this.partOpen();
|
|
|
- },
|
|
|
saveSell() {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("此单据没有提交记录,请先提交");
|
|
@@ -922,10 +915,6 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- partOpen() {
|
|
|
- this.partType = true;
|
|
|
- this.addLibrary();
|
|
|
- },
|
|
|
rePick(row, index) {
|
|
|
this.reData = {
|
|
|
...row,
|
|
@@ -995,14 +984,7 @@ export default {
|
|
|
},
|
|
|
partClosed() {
|
|
|
this.partList = [];
|
|
|
- this.partreData = null;
|
|
|
- if (this.partType) {
|
|
|
- this.partType = false;
|
|
|
- }
|
|
|
},
|
|
|
- // getcorpId(row) {
|
|
|
- // this.data[row.index].corpId = row.id;
|
|
|
- // },
|
|
|
rowCell(row, index) {
|
|
|
if (row.$cellEdit == true) {
|
|
|
this.$set(row, "$cellEdit", false);
|
|
@@ -1239,88 +1221,50 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- importLibray(rows, status) {
|
|
|
- if (status) {
|
|
|
- if (this.partreData) {
|
|
|
- rows.forEach(e => {
|
|
|
- this.partList.forEach((item, index) => {
|
|
|
- if (index == this.partreData.index) {
|
|
|
- item.goodId = e.itemId;
|
|
|
- item.goodTypeId = e.goodTypeId;
|
|
|
- item.goodTypeName = e.goodsTypeName;
|
|
|
- item.goodName = e.cname;
|
|
|
- item.price = e.purchaseAmount;
|
|
|
- item.goodNumber = this.partreData.goodNumber;
|
|
|
- item.amout = _.multiply(
|
|
|
- Number(
|
|
|
- this.partreData.goodNumber ? this.partreData.goodNumber : 0
|
|
|
- ),
|
|
|
- Number(e.purchaseAmount ? e.purchaseAmount : 0)
|
|
|
- );
|
|
|
- this.partreData.amout;
|
|
|
- item.$cellEdit = true;
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- rows.forEach(e => {
|
|
|
- this.partList.push({
|
|
|
- goodId: e.itemId,
|
|
|
- goodTypeId: e.goodTypeId,
|
|
|
- goodTypeName: e.goodsTypeName,
|
|
|
- goodName: e.cname,
|
|
|
- price: e.purchaseAmount,
|
|
|
- goodNumber: 1,
|
|
|
- amout: e.purchaseAmount,
|
|
|
- $cellEdit: true
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- rows.forEach(e => {
|
|
|
- this.data.push({
|
|
|
- itemId: e.itemId,
|
|
|
- code: e.code,
|
|
|
- cname: e.cname,
|
|
|
- priceCategory: e.goodsTypeName,
|
|
|
- purchaseAmount: e.purchaseAmount,
|
|
|
- itemProp: e.goodNature,
|
|
|
- corpId: e.corpId,
|
|
|
- corpName: e.corpName,
|
|
|
- itemDescription: e.cnameDescription,
|
|
|
- partsList: [],
|
|
|
- partsPrice: 0,
|
|
|
- itemType: e.specs,
|
|
|
- tradeTerms: null,
|
|
|
- productPrice: Number(
|
|
|
- _.multiply(
|
|
|
- Number(e.purchaseAmount),
|
|
|
- Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
- )
|
|
|
- ).toFixed(2),
|
|
|
- price: Number(
|
|
|
- _.multiply(
|
|
|
- Number(e.purchaseAmount),
|
|
|
- Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
- )
|
|
|
- ).toFixed(2),
|
|
|
- orderQuantity: 1,
|
|
|
- insurance: 0,
|
|
|
- freight: 0,
|
|
|
- discount: null,
|
|
|
- amount: Number(
|
|
|
- _.multiply(
|
|
|
- Number(e.purchaseAmount),
|
|
|
- Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
- )
|
|
|
- ).toFixed(2),
|
|
|
- taxRate: 0,
|
|
|
- unit: e.unit,
|
|
|
- remarks: null,
|
|
|
- $cellEdit: true
|
|
|
- });
|
|
|
+ importLibray(rows) {
|
|
|
+ rows.forEach(e => {
|
|
|
+ this.data.push({
|
|
|
+ itemId: e.itemId,
|
|
|
+ code: e.code,
|
|
|
+ cname: e.cname,
|
|
|
+ priceCategory: e.goodsTypeName,
|
|
|
+ purchaseAmount: e.purchaseAmount,
|
|
|
+ itemProp: e.goodNature,
|
|
|
+ corpId: e.corpId,
|
|
|
+ corpName: e.corpName,
|
|
|
+ itemDescription: e.cnameDescription,
|
|
|
+ partsList: [],
|
|
|
+ partsPrice: 0,
|
|
|
+ itemType: e.specs,
|
|
|
+ tradeTerms: null,
|
|
|
+ productPrice: Number(
|
|
|
+ _.multiply(
|
|
|
+ Number(e.purchaseAmount),
|
|
|
+ Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
+ )
|
|
|
+ ).toFixed(2),
|
|
|
+ price: Number(
|
|
|
+ _.multiply(
|
|
|
+ Number(e.purchaseAmount),
|
|
|
+ Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
+ )
|
|
|
+ ).toFixed(2),
|
|
|
+ orderQuantity: 1,
|
|
|
+ insurance: 0,
|
|
|
+ freight: 0,
|
|
|
+ discount: null,
|
|
|
+ amount: Number(
|
|
|
+ _.multiply(
|
|
|
+ Number(e.purchaseAmount),
|
|
|
+ Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
+ )
|
|
|
+ ).toFixed(2),
|
|
|
+ taxRate: 0,
|
|
|
+ unit: e.unit,
|
|
|
+ remarks: null,
|
|
|
+ $cellEdit: true
|
|
|
});
|
|
|
- }
|
|
|
+ });
|
|
|
},
|
|
|
//商品明细导入
|
|
|
newDetails() {
|