Commit 974fc4e8 authored by 仇晓婷's avatar 仇晓婷

报价bug

parent f94fa56e
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
title="订单报价" title="订单报价"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel"
fullscreen fullscreen
footer-hide footer-hide
> >
...@@ -107,12 +108,12 @@ ...@@ -107,12 +108,12 @@
</template> </template>
<script> <script>
import MetalQuotationGeneration from '../components/metalQuotationGeneration.vue' //生成报价单弹框 import MetalQuotationGeneration from "../components/metalQuotationGeneration.vue"; //生成报价单弹框
export default { export default {
components: { components: {
MetalQuotationGeneration MetalQuotationGeneration
}, },
name: '', name: "",
props: { props: {
gmData: Array gmData: Array
}, },
...@@ -122,172 +123,172 @@ export default { ...@@ -122,172 +123,172 @@ export default {
result: [] result: []
}, },
row: {}, row: {},
index: '', index: "",
newList: [], newList: [],
formItem: { formItem: {
postCompany: '', postCompany: "",
contactUser: '', contactUser: "",
contactTel: '', contactTel: "",
quotationType: 'AlSi10Mg', quotationType: "AlSi10Mg",
remark: '' remark: ""
}, },
values1: '', values1: "",
values2: '', values2: "",
values3: '', values3: "",
modalShow: false, modalShow: false,
columns: [ columns: [
{ {
title: '序号', title: "序号",
type: 'index', type: "index",
width: 50, width: 50,
align: 'center' align: "center"
}, },
// { type: 'selection', width: 60, align: 'center' }, // { type: 'selection', width: 60, align: 'center' },
{ {
title: '订单编号', title: "订单编号",
key: 'mesCode', key: "mesCode",
align: 'center', align: "center",
minWidth: 120 minWidth: 120
}, },
{ {
title: '产品名称', title: "产品名称",
key: 'productName', key: "productName",
align: 'center', align: "center",
minWidth: 80 minWidth: 80
}, },
{ {
title: '重量(g)', title: "重量(g)",
key: 'materialWeight', key: "materialWeight",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot1' slot: "slot1"
}, },
{ {
title: '单价(元/g)', title: "单价(元/g)",
key: 'materialUnitPrice', key: "materialUnitPrice",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot2' slot: "slot2"
}, },
{ {
title: '材料费', title: "材料费",
key: 'materialCost', key: "materialCost",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot3' //计算 slot: "slot3" //计算
}, },
{ {
title: '3D打印费', title: "3D打印费",
align: 'center', align: "center",
key: 'printPrice', key: "printPrice",
minWidth: 60, minWidth: 60,
slot: 'slot4' slot: "slot4"
}, },
{ {
title: '后处理加工费', title: "后处理加工费",
align: 'center', align: "center",
key: 'afterProcessPrice', key: "afterProcessPrice",
minWidth: 60, minWidth: 60,
slot: 'slot5' slot: "slot5"
}, },
{ {
title: '线切割费', title: "线切割费",
align: 'center', align: "center",
key: 'wrieCutPrice', key: "wrieCutPrice",
minWidth: 60, minWidth: 60,
slot: 'slot6' slot: "slot6"
}, },
{ {
title: '加工费单价', title: "加工费单价",
align: 'center', align: "center",
key: 'ProcessPrice', key: "ProcessPrice",
minWidth: 60, minWidth: 60,
slot: 'slot7' //计算 slot: "slot7" //计算
}, },
{ {
title: '尺寸检测费', title: "尺寸检测费",
key: 'sizeCheckPrice', key: "sizeCheckPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot8' slot: "slot8"
}, },
{ {
title: '理化检测费', title: "理化检测费",
key: 'physicCheckPrice', key: "physicCheckPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot9' slot: "slot9"
}, },
{ {
title: '包装费', title: "包装费",
key: 'packingPrice', key: "packingPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot10' slot: "slot10"
}, },
{ {
title: '单价(元)', title: "单价(元)",
key: 'unitPrice', key: "unitPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot11' slot: "slot11"
}, },
{ {
title: '数量', title: "数量",
key: 'num', key: "num",
align: 'center', align: "center",
minWidth: 70 minWidth: 70
// slot: 'slot12' // slot: 'slot12'
}, },
{ {
title: '热处理', title: "热处理",
key: 'heatTreatPrice', key: "heatTreatPrice",
align: 'center', align: "center",
minWidth: 70, minWidth: 70,
slot: 'slot13' slot: "slot13"
}, },
{ {
title: '价格(元)', title: "价格(元)",
key: 'price', key: "price",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot14' slot: "slot14"
}, },
{ {
title: '备注', title: "备注",
key: 'remark', key: "remark",
align: 'center', align: "center",
minWidth: 200, minWidth: 200,
slot: 'slot15', slot: "slot15",
tooltip: true tooltip: true
} }
] ]
} };
}, },
mounted() {}, mounted() {},
watch: { watch: {
gmData: { gmData: {
handler(newName, oldName) { handler(newName, oldName) {
newName.forEach((data) => { newName.forEach(data => {
data.materialCost = 0 data.materialCost = 0;
data.materialWeight = 0 data.materialWeight = 0;
data.materialUnitPrice = 0 data.materialUnitPrice = 0;
data.ProcessPrice = 0 data.ProcessPrice = 0;
data.printPrice = 0 data.printPrice = 0;
data.afterProcessPrice = 0 data.afterProcessPrice = 0;
data.wrieCutPrice = 0 data.wrieCutPrice = 0;
data.unitPrice = 0 data.unitPrice = 0;
data.sizeCheckPrice = 0 data.sizeCheckPrice = 0;
data.physicCheckPrice = 0 data.physicCheckPrice = 0;
data.packingPrice = 0 data.packingPrice = 0;
data.price = 0 data.price = 0;
data.heatTreatPrice = 0 data.heatTreatPrice = 0;
}) });
return newName return newName;
}, },
deep: true deep: true
} }
...@@ -297,14 +298,14 @@ export default { ...@@ -297,14 +298,14 @@ export default {
//计算材料费=重量(g)*单价(元/g) //计算材料费=重量(g)*单价(元/g)
return (this.row.materialCost = return (this.row.materialCost =
parseInt(this.row.materialWeight) * parseInt(this.row.materialWeight) *
parseInt(this.row.materialUnitPrice)) parseInt(this.row.materialUnitPrice));
}, },
jgD() { jgD() {
//加工费单价=加工费单价=3D打印+后处理加+线切割加工; //加工费单价=加工费单价=3D打印+后处理加+线切割加工;
return (this.row.ProcessPrice = return (this.row.ProcessPrice =
parseInt(this.row.printPrice) + parseInt(this.row.printPrice) +
parseInt(this.row.afterProcessPrice) + parseInt(this.row.afterProcessPrice) +
parseInt(this.row.wrieCutPrice)) parseInt(this.row.wrieCutPrice));
}, },
unitP() { unitP() {
//加工费单价=加工费单价=3D打印+后处理加+线切割加工; //加工费单价=加工费单价=3D打印+后处理加+线切割加工;
...@@ -313,170 +314,173 @@ export default { ...@@ -313,170 +314,173 @@ export default {
parseInt(this.row.ProcessPrice) + parseInt(this.row.ProcessPrice) +
parseInt(this.row.sizeCheckPrice) + parseInt(this.row.sizeCheckPrice) +
parseInt(this.row.physicCheckPrice) + parseInt(this.row.physicCheckPrice) +
parseInt(this.row.packingPrice)) parseInt(this.row.packingPrice));
}, },
unitPrices() { unitPrices() {
//单价=单件材料费+加工费单价+其他; //单价=单件材料费+加工费单价+其他;
return (this.row.unitPrice = return (this.row.unitPrice =
parseInt(this.row.materialCost) + parseInt(this.row.ProcessPrice)) parseInt(this.row.materialCost) + parseInt(this.row.ProcessPrice));
}, },
priceKey() { priceKey() {
// 价格=单价*数量+热处理 // 价格=单价*数量+热处理
return (this.row.price = return (this.row.price =
parseInt(this.row.unitPrice) * parseInt(this.row.num) + parseInt(this.row.unitPrice) * parseInt(this.row.num) +
parseInt(this.row.heatTreatPrice)) parseInt(this.row.heatTreatPrice));
} }
}, },
methods: { methods: {
previousStep() { previousStep() {
this.modalShow = false this.modalShow = false;
}, },
quotationBox() { quotationBox() {
//订单报价 //订单报价
// console.log(this.newList) // console.log(this.newList)
let item = [] let item = [];
let quotationMain = {} let quotationMain = {};
let data = { let data = {
quotationMain: this.formItem, quotationMain: this.formItem,
item: this.gmData item: this.gmData
} };
var url = `${PlanUrl}/quotationmain/createorupdate` var url = `${PlanUrl}/quotationmain/createorupdate`;
this.$api this.$api
.post(url, data) .post(url, data)
.then((res) => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true this.$refs.photosensitive.modalShow = true;
let id = res.result.id let id = res.result.id;
this.$http.quotation this.$http.quotation
.orderList({ .orderList({
id: id id: id
}) })
.then((res) => { .then(res => {
res.result.forEach((data, index) => { res.result.forEach((data, index) => {
res.result[index].quotationId = id res.result[index].quotationId = id;
}) });
this.zPhotosensitive.result = res.result this.zPhotosensitive.result = res.result;
})
.catch((error) => {
this.$Message.error('请求失败')
}) })
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch((error) => { .catch(error => {
this.$Message.error('保存失败') this.$Message.error("保存失败");
}) });
}, },
close() { close() {
this.modalShow = false; this.modalShow = false;
this.$emit("update") this.$emit("update");
}, },
//表格输入 //表格输入
show1(row, index) { show1(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show2(row, index) { show2(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show4(row, index) { show4(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show5(row, index) { show5(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show6(row, index) { show6(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show8(row, index) { show8(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show9(row, index) { show9(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show10(row, index) { show10(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show11(row, index) { show11(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show13(row, index) { show13(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show15(row, index) { show15(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
},
cancel() {
this.$emit('update')
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.footers { .footers {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:mask-closable="false" :mask-closable="false"
fullscreen fullscreen
footer-hide footer-hide
@on-cancel="cancel"
> >
<Form :model="formItem" :label-width="80"> <Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between"> <Row type="flex" justify="space-between">
...@@ -70,12 +71,12 @@ ...@@ -70,12 +71,12 @@
</template> </template>
<script> <script>
import PhotosensitiveGeneration from '../components/photosensitiveGeneration.vue' //生成报价单弹框 import PhotosensitiveGeneration from "../components/photosensitiveGeneration.vue"; //生成报价单弹框
export default { export default {
components: { components: {
PhotosensitiveGeneration PhotosensitiveGeneration
}, },
name: '', name: "",
props: { props: {
gmData: Array gmData: Array
}, },
...@@ -85,98 +86,98 @@ export default { ...@@ -85,98 +86,98 @@ export default {
result: [] result: []
}, },
row: {}, row: {},
index: '', index: "",
newList: [], newList: [],
formItem: { formItem: {
postCompany: '', postCompany: "",
contactUser: '', contactUser: "",
contactTel: '', contactTel: "",
quotationType: '光敏树脂', quotationType: "光敏树脂",
remark: '' remark: ""
}, },
values1: '', values1: "",
values2: '', values2: "",
values3: '', values3: "",
modalShow: false, modalShow: false,
columns: [ columns: [
{ {
title: '序号', title: "序号",
type: 'index', type: "index",
width: 50, width: 50,
align: 'center' align: "center"
}, },
{ {
title: '订单编号', title: "订单编号",
key: 'mesCode', key: "mesCode",
align: 'center', align: "center",
minWidth: 120 minWidth: 120
}, },
{ {
title: '产品名称', title: "产品名称",
key: 'productName', key: "productName",
align: 'center', align: "center",
minWidth: 80 minWidth: 80
}, },
{ {
title: '重量(g)', title: "重量(g)",
key: 'materialWeight', key: "materialWeight",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot1' slot: "slot1"
}, },
{ {
title: '单价(元/g)', title: "单价(元/g)",
key: 'materialUnitPrice', key: "materialUnitPrice",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot2' slot: "slot2"
}, },
{ {
title: '3D打印费', title: "3D打印费",
align: 'center', align: "center",
key: 'printPrice', key: "printPrice",
minWidth: 60, minWidth: 60,
slot: 'slot3' slot: "slot3"
}, },
{ {
title: '尺寸检测费', title: "尺寸检测费",
key: 'sizeCheckPrice', key: "sizeCheckPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot4' slot: "slot4"
}, },
{ {
title: '单价(元)', title: "单价(元)",
key: 'unitPrice', key: "unitPrice",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
slot: 'slot6' slot: "slot6"
}, },
{ {
title: '数量', title: "数量",
key: 'num', key: "num",
align: 'center', align: "center",
minWidth: 70 minWidth: 70
}, },
{ {
title: '价格(元)', title: "价格(元)",
key: 'price', key: "price",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot7' slot: "slot7"
}, },
{ {
title: '备注', title: "备注",
key: 'remark1', key: "remark1",
align: 'center', align: "center",
minWidth: 200, minWidth: 200,
slot: 'slot5', slot: "slot5",
tooltip: true tooltip: true
} }
] ]
} };
}, },
// watch: { // watch: {
// row: { // row: {
...@@ -195,102 +196,105 @@ export default { ...@@ -195,102 +196,105 @@ export default {
//计算3D打印费=重量(g)*单价(元/g) //计算3D打印费=重量(g)*单价(元/g)
return (this.row.printPrice = return (this.row.printPrice =
parseInt(this.row.materialWeight) * parseInt(this.row.materialWeight) *
parseInt(this.row.materialUnitPrice)) parseInt(this.row.materialUnitPrice));
}, },
unitPrices() { unitPrices() {
//单价=3D打印费+尺寸检测费 //单价=3D打印费+尺寸检测费
return (this.row.unitPrice = return (this.row.unitPrice =
parseInt(this.row.printPrice) + parseInt(this.row.sizeCheckPrice)) parseInt(this.row.printPrice) + parseInt(this.row.sizeCheckPrice));
}, },
prices() { prices() {
// 价格=单价*数量 // 价格=单价*数量
return (this.row.price = return (this.row.price =
parseInt(this.row.unitPrice) * parseInt(this.row.num)) parseInt(this.row.unitPrice) * parseInt(this.row.num));
} }
}, },
methods: { methods: {
previousStep() { previousStep() {
this.modalShow = false this.modalShow = false;
}, },
quotationBox() { quotationBox() {
//订单报价 //订单报价
let item = [] let item = [];
let quotationMain = {} let quotationMain = {};
let data = { let data = {
quotationMain: this.formItem, quotationMain: this.formItem,
item: this.gmData item: this.gmData
} };
var url = `${PlanUrl}/quotationmain/createorupdate` var url = `${PlanUrl}/quotationmain/createorupdate`;
this.$api this.$api
.post(url, data) .post(url, data)
.then((res) => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true this.$refs.photosensitive.modalShow = true;
let id = res.result.id let id = res.result.id;
this.$http.quotation this.$http.quotation
.orderList({ .orderList({
id: id id: id
}) })
.then((res) => { .then(res => {
console.log(res) console.log(res);
res.result.forEach((data, index) => { res.result.forEach((data, index) => {
res.result[index].quotationId = id res.result[index].quotationId = id;
}) });
this.zPhotosensitive.result = res.result this.zPhotosensitive.result = res.result;
})
.catch((error) => {
this.$Message.error('请求失败')
}) })
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch((error) => { .catch(error => {
this.$Message.error('保存失败') this.$Message.error("保存失败");
}) });
}, },
close() { close() {
this.modalShow = false this.modalShow = false;
this.$emit('update') this.$emit("update");
}, },
show1(row, index) { show1(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show2(row, index) { show2(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
show3(row, index) { show3(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
}, },
//备注 //备注
show4(row, index) { show4(row, index) {
this.row = row this.row = row;
this.gmData.forEach((data, index) => { this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) { if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row this.gmData[index] = row;
} }
}) });
},
cancel() {
this.$emit("update");
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.footers { .footers {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
title="订单报价" title="订单报价"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel"
fullscreen fullscreen
footer-hide footer-hide
> >
...@@ -55,32 +56,32 @@ ...@@ -55,32 +56,32 @@
</template> </template>
<script> <script>
import GenerateQuotation from '../components/generateQuotation.vue' //生成报价单弹框 import GenerateQuotation from "../components/generateQuotation.vue"; //生成报价单弹框
export default { export default {
components: { components: {
GenerateQuotation GenerateQuotation
}, },
name: '', name: "",
props: { props: {
bjData: Array bjData: Array
}, },
data() { data() {
return { return {
values1: '', values1: "",
values2: '', values2: "",
values3: '', values3: "",
modalShow: false, modalShow: false,
columns: [ columns: [
{ {
title: '序号', title: "序号",
type: 'index', type: "index",
width: 50, width: 50,
align: 'center' align: "center"
}, },
{ {
title: '订单编号', title: "订单编号",
key: 'name', key: "name",
align: 'center', align: "center",
minWidth: 120 minWidth: 120
}, },
// { // {
...@@ -90,286 +91,289 @@ export default { ...@@ -90,286 +91,289 @@ export default {
// minWidth: 60 // minWidth: 60
// }, // },
{ {
title: '产品名称', title: "产品名称",
key: 'name2', key: "name2",
align: 'center', align: "center",
minWidth: 80 minWidth: 80
}, },
{ {
title: '规格', title: "规格",
key: 'name4', key: "name4",
align: 'center', align: "center",
minWidth: 80 minWidth: 80
}, },
{ {
title: '材料牌号', title: "材料牌号",
key: 'name5', key: "name5",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot6' slot: "slot6"
}, },
{ {
title: '材料重量', title: "材料重量",
key: 'name6', key: "name6",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot7' slot: "slot7"
}, },
{ {
title: '材料单价', title: "材料单价",
key: 'name7', key: "name7",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot8' slot: "slot8"
}, },
{ {
title: '材料费/件(元)', title: "材料费/件(元)",
key: 'name8', key: "name8",
align: 'center', align: "center",
minWidth: 70 minWidth: 70
}, },
{ {
title: '3D打印费', title: "3D打印费",
align: 'center', align: "center",
children: [ children: [
{ {
// title: '1600/H', // title: '1600/H',
key: 'name9', key: "name9",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
className: 'conciseContent', className: "conciseContent",
slot: 'slot1', slot: "slot1",
renderHeader: (h, params) => { renderHeader: (h, params) => {
return h('div', [ return h("div", [
h('Input', { h("Input", {
props: { props: {
value: '1600', value: "1600",
placeholder: '请输入' placeholder: "请输入"
}, },
on: { on: {
'on-change': (value) => { "on-change": value => {
console.log(value) console.log(value);
} }
} }
}), }),
h('span', ' /H') h("span", " /H")
]) ]);
} }
} }
] ]
}, },
{ {
title: '后处理费', title: "后处理费",
align: 'center', align: "center",
children: [ children: [
{ {
// title: '200/H', // title: '200/H',
key: 'name10', key: "name10",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
className: 'conciseContent', className: "conciseContent",
slot: 'slot2', slot: "slot2",
renderHeader: (h, params) => { renderHeader: (h, params) => {
return h('div', [ return h("div", [
h('Input', { h("Input", {
props: { props: {
value: '200', value: "200",
placeholder: '请输入' placeholder: "请输入"
}, },
on: { on: {
'on-change': (value) => { "on-change": value => {
console.log(value) console.log(value);
} }
} }
}), }),
h('span', ' /H') h("span", " /H")
]) ]);
} }
} }
] ]
}, },
{ {
title: '线切割费', title: "线切割费",
align: 'center', align: "center",
children: [ children: [
{ {
title: '100/H', title: "100/H",
key: 'name11', key: "name11",
align: 'center', align: "center",
minWidth: 60, minWidth: 60,
className: 'conciseContent', className: "conciseContent",
slot: 'slot3', slot: "slot3",
renderHeader: (h, params) => { renderHeader: (h, params) => {
return h('div', [ return h("div", [
h('Input', { h("Input", {
props: { props: {
value: '100', value: "100",
placeholder: '请输入' placeholder: "请输入"
}, },
on: { on: {
'on-change': (value) => { "on-change": value => {
console.log(value) console.log(value);
} }
} }
}), }),
h('span', ' /H') h("span", " /H")
]) ]);
} }
} }
] ]
}, },
{ {
title: '加工费单价', title: "加工费单价",
key: 'name12', key: "name12",
align: 'center', align: "center",
minWidth: 60 minWidth: 60
}, },
{ {
title: '其它', title: "其它",
key: 'name13', key: "name13",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot4' slot: "slot4"
}, },
{ {
title: '单价', title: "单价",
key: 'name14', key: "name14",
align: 'center', align: "center",
minWidth: 60 minWidth: 60
}, },
{ {
title: '数量', title: "数量",
key: 'name3', key: "name3",
align: 'center', align: "center",
minWidth: 70 minWidth: 70
}, },
{ {
title: '热处理', title: "热处理",
key: 'name15', key: "name15",
align: 'center', align: "center",
minWidth: 80, minWidth: 80,
slot: 'slot5' slot: "slot5"
}, },
{ {
title: '合计', title: "合计",
key: 'name16', key: "name16",
align: 'center', align: "center",
minWidth: 80 minWidth: 80
}, },
{ {
title: '调度', title: "调度",
key: 'name17', key: "name17",
align: 'center', align: "center",
minWidth: 60 minWidth: 60
} }
], ],
data: [ data: [
{ {
name: 'a1233_155111_20192010', name: "a1233_155111_20192010",
name1: 'a002', name1: "a002",
name2: 'W123', name2: "W123",
name3: '250', name3: "250",
name4: '2019-1', name4: "2019-1",
name5: '', name5: "",
name6: '', name6: "",
name7: '', name7: "",
name8: '100', name8: "100",
name9: '2', name9: "2",
name10: '3', name10: "3",
name11: '5', name11: "5",
name12: '100', name12: "100",
name13: '', name13: "",
name14: '', name14: "",
name15: '', name15: "",
name16: '', name16: "",
name17: '小明' name17: "小明"
}, },
{ {
name: 'a1233', name: "a1233",
name1: 'a002', name1: "a002",
name2: 'W123', name2: "W123",
name3: '10000', name3: "10000",
name4: '2019-1', name4: "2019-1",
name5: '', name5: "",
name6: '', name6: "",
name7: '', name7: "",
name8: '200', name8: "200",
name9: '2', name9: "2",
name10: '3', name10: "3",
name11: '5', name11: "5",
name12: '200', name12: "200",
name13: '', name13: "",
name14: '', name14: "",
name15: '', name15: "",
name16: '', name16: "",
name17: '小明' name17: "小明"
}, },
{ {
name: 'a1233', name: "a1233",
name1: 'b452', name1: "b452",
name2: 'W123', name2: "W123",
name3: '200000', name3: "200000",
name4: '2019-1', name4: "2019-1",
name5: '', name5: "",
name6: '', name6: "",
name7: '', name7: "",
name8: '200', name8: "200",
name9: '2', name9: "2",
name10: '3', name10: "3",
name11: '5', name11: "5",
name12: '100', name12: "100",
name13: '', name13: "",
name14: '', name14: "",
name15: '', name15: "",
name16: '', name16: "",
name17: '小明' name17: "小明"
} }
] ]
} };
}, },
mounted() {}, mounted() {},
methods: { methods: {
quotationBox() { quotationBox() {
this.$refs.generateQuotation.modalShow = true this.$refs.generateQuotation.modalShow = true;
}, },
previousStep() { previousStep() {
this.modalShow = false this.modalShow = false;
}, },
//3D打印费 //3D打印费
showPrinting(row, index) { showPrinting(row, index) {
return (row.name12 = return (row.name12 =
parseInt(row.name9) * 1600 + parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 + parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用 parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
}, },
//后处理费 //后处理费
showPostProcessing(row, index) { showPostProcessing(row, index) {
return (row.name12 = return (row.name12 =
parseInt(row.name9) * 1600 + parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 + parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用 parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
}, },
//线切割费 //线切割费
showWireCutting(row, index) { showWireCutting(row, index) {
return (row.name12 = return (row.name12 =
parseInt(row.name9) * 1600 + parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 + parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用 parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
}, },
//其它 //其它
showOther(row, index) { showOther(row, index) {
return (row.name14 = return (row.name14 =
parseInt(row.name8) + parseInt(row.name12) + parseInt(row.name13)) //单价=材料费/件(元)+加工费单价+其它 parseInt(row.name8) + parseInt(row.name12) + parseInt(row.name13)); //单价=材料费/件(元)+加工费单价+其它
}, },
//热处理 //热处理
showHeatTreatment(row, index) { showHeatTreatment(row, index) {
return (row.name16 = return (row.name16 =
parseInt(row.name14) * parseInt(row.name3) + parseInt(row.name15)) //合计=单价*数量+热处理 parseInt(row.name14) * parseInt(row.name3) + parseInt(row.name15)); //合计=单价*数量+热处理
},
cancel() {
this.$emit('update')
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.footers { .footers {
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<!-- 高级搜索弹框 --> <!-- 高级搜索弹框 -->
<Search-Box ref="searchBox" @heightSearch="gSearch"></Search-Box> <Search-Box ref="searchBox" @heightSearch="gSearch"></Search-Box>
<!-- 订单报价 --> <!-- 订单报价 -->
<Quotation-Box ref="quotationBox" :bjData="newJsData"></Quotation-Box> <Quotation-Box ref="quotationBox" :bjData="newJsData" @update="update"></Quotation-Box>
<Metal-Quotation ref="metalQuotation" :gmData="newJsData" @update="update"></Metal-Quotation> <Metal-Quotation ref="metalQuotation" :gmData="newJsData" @update="update"></Metal-Quotation>
<Photosensitive ref="photosensitive" :gmData="newJsData" @update="update"></Photosensitive> <Photosensitive ref="photosensitive" :gmData="newJsData" @update="update"></Photosensitive>
<Metal-Details ref="metalDetail" :resultDetils="resultDetils"></Metal-Details> <Metal-Details ref="metalDetail" :resultDetils="resultDetils"></Metal-Details>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment