Commit 3608078b authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 550d0867 1a8e8973
......@@ -17,7 +17,7 @@
:closable="page.meta && page.meta.closable"
/>
</Tabs>
<Dropdown class="i-layout-tabs-close" @on-click="handleClose">
<Dropdown class="i-layout-tabs-close" @on-click="handleClose" placement="bottom-end">
<div class="i-layout-tabs-close-main">
<Icon type="ios-arrow-down" />
</div>
......
......@@ -12,7 +12,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('repair_file_url')">{{formValidate.repair_file_url}}</Filed>
<Filed :span="8" :name="l('repair_file_url')">
<a
v-if="formValidate.repair_file_url"
:href="url(formValidate.repair_file_url)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('supporting_file_name')">{{formValidate.supporting_file_name}}</Filed>
<Filed :span="8" :name="l('supporting_file_status')">
......@@ -22,7 +28,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('supporting_file_url')">{{formValidate.supporting_file_ulr}}</Filed>
<Filed :span="8" :name="l('supporting_file_url')">
<a
v-if="formValidate.supporting_file_ulr"
:href="url(formValidate.supporting_file_ulr)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('slicing_file_name')">{{formValidate.slicing_file_name}}</Filed>
<Filed :span="8" :name="l('slicing_file_status')">
<state
......@@ -31,57 +43,66 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('slicing_file_url')">{{formValidate.slicing_file_url}}</Filed>
<Filed :span="8" :name="l('slicing_file_url')">
<a
v-if="formValidate.slicing_file_url"
:href="url(formValidate.slicing_file_url)"
target="_balck"
>下载</a>
</Filed>
</Row>
</div>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
name: 'detail',
name: "detail",
components: {},
props: {
idVal: {
type: String,
default: ''
default: ""
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
formValidate: {
state: ''
}
state: ""
}
};
},
created() {
this.dataImmut = []
this.dataMut = []
Api.get({ Id: this.idVal }).then((r) => {
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then(r => {
if (r.success) {
let farmData = {}
farmData = JSON.parse(r.result.formData)
console.log(farmData)
this.formValidate = farmData
let farmData = {};
farmData = JSON.parse(r.result.formData);
console.log(farmData);
this.formValidate = farmData;
// let formStr = r.result.formData.replace(/\"/g, '"')
// this.formValidate = JSON.parse(formStr)[0]
} else {
this.$Message.error('加载失败')
this.$Message.error("加载失败");
}
})
});
},
methods: {
load(v) {},
url(path) {
return fileUrlDown + path
},
l(key) {
key = 'OrderDataReview' + '.' + key
return this.$t(key)
key = "OrderDataReview" + "." + key;
return this.$t(key);
}
},
watch: {}
}
};
</script>
<style lang="less">
.detail {
......
......@@ -12,7 +12,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('slicing_file_url')">{{formValidate.slicing_file_url}}</Filed>
<Filed :span="8" :name="l('slicing_file_url')">
<a
v-if="formValidate.slicing_file_url"
:href="url(formValidate.slicing_file_url)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('supporting_file_name')">{{formValidate.supporting_file_name}}</Filed>
<Filed :span="8" :name="l('supporting_file_status')">
<state
......@@ -21,7 +27,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('repair_file_url')">{{formValidate.repair_file_url}}</Filed>
<Filed :span="8" :name="l('repair_file_url')">
<a
v-if="formValidate.repair_file_url"
:href="url(formValidate.repair_file_url)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('slicing_file_name')">{{formValidate.slicing_file_name}}</Filed>
<Filed :span="8" :name="l('slicing_file_status')">
<state
......@@ -30,58 +42,67 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('supporting_file_url')">{{formValidate.supporting_file_ulr}}</Filed>
<Filed :span="8" :name="l('supporting_file_url')">
<a
v-if="formValidate.supporting_file_ulr"
:href="url(formValidate.supporting_file_ulr)"
target="_balck"
>下载</a>
</Filed>
</Row>
</div>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
name: 'detail',
name: "detail",
components: {},
props: {
idVal: {
type: String,
default: ''
default: ""
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
formValidate: {
state: ''
}
state: ""
}
};
},
created() {
this.dataImmut = []
this.dataMut = []
Api.get({ Id: this.idVal }).then((r) => {
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then(r => {
// console.log(r)
if (r.success) {
let farmData = {}
farmData = JSON.parse(r.result.formData)
console.log(farmData)
this.formValidate = farmData
let farmData = {};
farmData = JSON.parse(r.result.formData);
console.log(farmData);
this.formValidate = farmData;
// let formStr = r.result.formData.replace(/\"/g, '"')
// this.formValidate = JSON.parse(formStr)[0]
} else {
this.$Message.error('加载失败')
this.$Message.error("加载失败");
}
})
});
},
methods: {
load(v) {},
url(path) {
return fileUrlDown + path;
},
l(key) {
key = 'OrderDataReview' + '.' + key
return this.$t(key)
key = "OrderDataReview" + "." + key;
return this.$t(key);
}
},
watch: {}
}
};
</script>
<style lang="less">
.detail {
......
......@@ -12,7 +12,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('repair_file_url')">{{formValidate.repair_file_url}}</Filed>
<Filed :span="8" :name="l('repair_file_url')">
<a
v-if="formValidate.repair_file_url"
:href="url(formValidate.repair_file_url)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('supporting_file_name')">{{formValidate.supporting_file_name}}</Filed>
<Filed :span="8" :name="l('supporting_file_status')">
......@@ -22,7 +28,13 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('supporting_file_url')">{{formValidate.supporting_file_ulr}}</Filed>
<Filed :span="8" :name="l('supporting_file_url')">
<a
v-if="formValidate.supporting_file_ulr"
:href="url(formValidate.supporting_file_ulr)"
target="_balck"
>下载</a>
</Filed>
<Filed :span="8" :name="l('slicing_file_name')">{{formValidate.slicing_file_name}}</Filed>
<Filed :span="8" :name="l('slicing_file_status')">
<state
......@@ -31,58 +43,67 @@
type="text"
></state>
</Filed>
<Filed :span="8" :name="l('slicing_file_url')">{{formValidate.slicing_file_url}}</Filed>
<Filed :span="8" :name="l('slicing_file_url')">
<a
v-if="formValidate.slicing_file_url"
:href="url(formValidate.slicing_file_url)"
target="_balck"
>下载</a>
</Filed>
</Row>
</div>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
name: 'detail',
name: "detail",
components: {},
props: {
idVal: {
type: String,
default: ''
default: ""
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
formValidate: {
state: ''
}
state: ""
}
};
},
created() {
this.dataImmut = []
this.dataMut = []
Api.get({ Id: this.idVal }).then((r) => {
console.log(r)
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then(r => {
console.log(r);
if (r.success) {
let farmData = {}
farmData = JSON.parse(r.result.formData)
console.log(farmData)
this.formValidate = farmData
let farmData = {};
farmData = JSON.parse(r.result.formData);
console.log(farmData);
this.formValidate = farmData;
// let formStr = r.result.formData.replace(/\"/g, '"')
// this.formValidate = JSON.parse(formStr)[0]
} else {
this.$Message.error('加载失败')
this.$Message.error("加载失败");
}
})
});
},
methods: {
load(v) {},
url(path) {
return fileUrlDown + path
},
l(key) {
key = 'OrderDataReview' + '.' + key
return this.$t(key)
key = "OrderDataReview" + "." + key;
return this.$t(key);
}
},
watch: {}
}
};
</script>
<style lang="less">
.detail {
......
......@@ -144,12 +144,13 @@ export default {
this.cur = i
};
// if(u.defaultUsers.mutable&&u.defaultUsers.mutable.length>0){
u.defaultUsers.immutable=u.defaultUsers.immutable.concat(u.defaultUsers.mutable)
// u.defaultUsers.immutable=u.defaultUsers.immutable.concat(u.defaultUsers.mutable)
u.defaultUsers.immutable=u.defaultUsers.immutable||(u.defaultUsers.mutable)//审核人员bug
// }
})
if (this.dataImmut.length > this.cur + 1) {
console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable.concat(this.dataImmut[this.cur + 1].defaultUsers.mutable)
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable||(this.dataImmut[this.cur + 1].defaultUsers.mutable)//审核人员bug
}
} else {
this.$Message.error('加载失败')
......
......@@ -425,8 +425,8 @@ export default {
detailId: u.detailId, //工序id--后端接收
detailNumber: u.detailNumber, //工序序号
detailTitle: u.detailTitle, //工序名称
quantity: u.boardQuantity, //投产数量--后端接收 u.quantity
quantityOld: u.boardQuantityOld, //拆分前的投产数量 u.quantityOld
quantity: u.quantity, //投产数量--后端接收 u.quantity
quantityOld: u.quantityOld, //拆分前的投产数量 u.quantityOld
pid: u.pid, //拆分添加的项使用
userIds: u.userIds, //人员id--后端接收
userTitles: u.userTitles, //人员名字
......
......@@ -5,6 +5,7 @@
title="订单报价"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
fullscreen
footer-hide
>
......@@ -107,12 +108,12 @@
</template>
<script>
import MetalQuotationGeneration from '../components/metalQuotationGeneration.vue' //生成报价单弹框
import MetalQuotationGeneration from "../components/metalQuotationGeneration.vue"; //生成报价单弹框
export default {
components: {
MetalQuotationGeneration
},
name: '',
name: "",
props: {
gmData: Array
},
......@@ -122,172 +123,172 @@ export default {
result: []
},
row: {},
index: '',
index: "",
newList: [],
formItem: {
postCompany: '',
contactUser: '',
contactTel: '',
quotationType: 'AlSi10Mg',
remark: ''
},
values1: '',
values2: '',
values3: '',
postCompany: "",
contactUser: "",
contactTel: "",
quotationType: "AlSi10Mg",
remark: ""
},
values1: "",
values2: "",
values3: "",
modalShow: false,
columns: [
{
title: '序号',
type: 'index',
title: "序号",
type: "index",
width: 50,
align: 'center'
align: "center"
},
// { type: 'selection', width: 60, align: 'center' },
{
title: '订单编号',
key: 'mesCode',
align: 'center',
title: "订单编号",
key: "mesCode",
align: "center",
minWidth: 120
},
{
title: '产品名称',
key: 'productName',
align: 'center',
title: "产品名称",
key: "productName",
align: "center",
minWidth: 80
},
{
title: '重量(g)',
key: 'materialWeight',
align: 'center',
title: "重量(g)",
key: "materialWeight",
align: "center",
minWidth: 80,
slot: 'slot1'
slot: "slot1"
},
{
title: '单价(元/g)',
key: 'materialUnitPrice',
align: 'center',
title: "单价(元/g)",
key: "materialUnitPrice",
align: "center",
minWidth: 80,
slot: 'slot2'
slot: "slot2"
},
{
title: '材料费',
key: 'materialCost',
align: 'center',
title: "材料费",
key: "materialCost",
align: "center",
minWidth: 80,
slot: 'slot3' //计算
slot: "slot3" //计算
},
{
title: '3D打印费',
align: 'center',
key: 'printPrice',
title: "3D打印费",
align: "center",
key: "printPrice",
minWidth: 60,
slot: 'slot4'
slot: "slot4"
},
{
title: '后处理加工费',
align: 'center',
key: 'afterProcessPrice',
title: "后处理加工费",
align: "center",
key: "afterProcessPrice",
minWidth: 60,
slot: 'slot5'
slot: "slot5"
},
{
title: '线切割费',
align: 'center',
key: 'wrieCutPrice',
title: "线切割费",
align: "center",
key: "wrieCutPrice",
minWidth: 60,
slot: 'slot6'
slot: "slot6"
},
{
title: '加工费单价',
align: 'center',
key: 'ProcessPrice',
title: "加工费单价",
align: "center",
key: "ProcessPrice",
minWidth: 60,
slot: 'slot7' //计算
slot: "slot7" //计算
},
{
title: '尺寸检测费',
key: 'sizeCheckPrice',
align: 'center',
title: "尺寸检测费",
key: "sizeCheckPrice",
align: "center",
minWidth: 60,
slot: 'slot8'
slot: "slot8"
},
{
title: '理化检测费',
key: 'physicCheckPrice',
align: 'center',
title: "理化检测费",
key: "physicCheckPrice",
align: "center",
minWidth: 60,
slot: 'slot9'
slot: "slot9"
},
{
title: '包装费',
key: 'packingPrice',
align: 'center',
title: "包装费",
key: "packingPrice",
align: "center",
minWidth: 60,
slot: 'slot10'
slot: "slot10"
},
{
title: '单价(元)',
key: 'unitPrice',
align: 'center',
title: "单价(元)",
key: "unitPrice",
align: "center",
minWidth: 60,
slot: 'slot11'
slot: "slot11"
},
{
title: '数量',
key: 'num',
align: 'center',
title: "数量",
key: "num",
align: "center",
minWidth: 70
// slot: 'slot12'
},
{
title: '热处理',
key: 'heatTreatPrice',
align: 'center',
title: "热处理",
key: "heatTreatPrice",
align: "center",
minWidth: 70,
slot: 'slot13'
slot: "slot13"
},
{
title: '价格(元)',
key: 'price',
align: 'center',
title: "价格(元)",
key: "price",
align: "center",
minWidth: 80,
slot: 'slot14'
slot: "slot14"
},
{
title: '备注',
key: 'remark',
align: 'center',
title: "备注",
key: "remark",
align: "center",
minWidth: 200,
slot: 'slot15',
slot: "slot15",
tooltip: true
}
]
}
};
},
mounted() {},
watch: {
gmData: {
handler(newName, oldName) {
newName.forEach((data) => {
data.materialCost = 0
data.materialWeight = 0
data.materialUnitPrice = 0
newName.forEach(data => {
data.materialCost = 0;
data.materialWeight = 0;
data.materialUnitPrice = 0;
data.ProcessPrice = 0
data.printPrice = 0
data.afterProcessPrice = 0
data.wrieCutPrice = 0
data.ProcessPrice = 0;
data.printPrice = 0;
data.afterProcessPrice = 0;
data.wrieCutPrice = 0;
data.unitPrice = 0
data.sizeCheckPrice = 0
data.physicCheckPrice = 0
data.packingPrice = 0
data.unitPrice = 0;
data.sizeCheckPrice = 0;
data.physicCheckPrice = 0;
data.packingPrice = 0;
data.price = 0
data.heatTreatPrice = 0
})
return newName
data.price = 0;
data.heatTreatPrice = 0;
});
return newName;
},
deep: true
}
......@@ -297,14 +298,14 @@ export default {
//计算材料费=重量(g)*单价(元/g)
return (this.row.materialCost =
parseInt(this.row.materialWeight) *
parseInt(this.row.materialUnitPrice))
parseInt(this.row.materialUnitPrice));
},
jgD() {
//加工费单价=加工费单价=3D打印+后处理加+线切割加工;
return (this.row.ProcessPrice =
parseInt(this.row.printPrice) +
parseInt(this.row.afterProcessPrice) +
parseInt(this.row.wrieCutPrice))
parseInt(this.row.wrieCutPrice));
},
unitP() {
//加工费单价=加工费单价=3D打印+后处理加+线切割加工;
......@@ -313,170 +314,173 @@ export default {
parseInt(this.row.ProcessPrice) +
parseInt(this.row.sizeCheckPrice) +
parseInt(this.row.physicCheckPrice) +
parseInt(this.row.packingPrice))
parseInt(this.row.packingPrice));
},
unitPrices() {
//单价=单件材料费+加工费单价+其他;
return (this.row.unitPrice =
parseInt(this.row.materialCost) + parseInt(this.row.ProcessPrice))
parseInt(this.row.materialCost) + parseInt(this.row.ProcessPrice));
},
priceKey() {
// 价格=单价*数量+热处理
return (this.row.price =
parseInt(this.row.unitPrice) * parseInt(this.row.num) +
parseInt(this.row.heatTreatPrice))
parseInt(this.row.heatTreatPrice));
}
},
methods: {
previousStep() {
this.modalShow = false
this.modalShow = false;
},
quotationBox() {
//订单报价
// console.log(this.newList)
let item = []
let quotationMain = {}
let item = [];
let quotationMain = {};
let data = {
quotationMain: this.formItem,
item: this.gmData
}
var url = `${PlanUrl}/quotationmain/createorupdate`
};
var url = `${PlanUrl}/quotationmain/createorupdate`;
this.$api
.post(url, data)
.then((res) => {
.then(res => {
if (res.success) {
this.$Message.success('保存成功')
this.$refs.photosensitive.modalShow = true
let id = res.result.id
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then((res) => {
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id
})
this.zPhotosensitive.result = res.result
})
.catch((error) => {
this.$Message.error('请求失败')
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
},
close() {
this.modalShow = false;
this.$emit("update")
this.$emit("update");
},
//表格输入
show1(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show2(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show4(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show5(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show6(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show8(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show9(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show10(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show11(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show13(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show15(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
cancel() {
this.$emit('update')
}
}
}
};
</script>
<style lang="less" scoped>
.footers {
......
......@@ -247,7 +247,7 @@ export default {
.then((res) => {
if (res.success) {
this.$Message.success('订单报价送审成功!')
this.$emit('on-close')
this.$emit("update")
this.modalShow = false
this.easySearch('')
} else {
......
......@@ -7,6 +7,7 @@
:mask-closable="false"
fullscreen
footer-hide
@on-cancel="cancel"
>
<Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between">
......@@ -70,12 +71,12 @@
</template>
<script>
import PhotosensitiveGeneration from '../components/photosensitiveGeneration.vue' //生成报价单弹框
import PhotosensitiveGeneration from "../components/photosensitiveGeneration.vue"; //生成报价单弹框
export default {
components: {
PhotosensitiveGeneration
},
name: '',
name: "",
props: {
gmData: Array
},
......@@ -85,98 +86,98 @@ export default {
result: []
},
row: {},
index: '',
index: "",
newList: [],
formItem: {
postCompany: '',
contactUser: '',
contactTel: '',
quotationType: '光敏树脂',
remark: ''
postCompany: "",
contactUser: "",
contactTel: "",
quotationType: "光敏树脂",
remark: ""
},
values1: '',
values2: '',
values3: '',
values1: "",
values2: "",
values3: "",
modalShow: false,
columns: [
{
title: '序号',
type: 'index',
title: "序号",
type: "index",
width: 50,
align: 'center'
align: "center"
},
{
title: '订单编号',
key: 'mesCode',
align: 'center',
title: "订单编号",
key: "mesCode",
align: "center",
minWidth: 120
},
{
title: '产品名称',
key: 'productName',
align: 'center',
title: "产品名称",
key: "productName",
align: "center",
minWidth: 80
},
{
title: '重量(g)',
key: 'materialWeight',
align: 'center',
title: "重量(g)",
key: "materialWeight",
align: "center",
minWidth: 80,
slot: 'slot1'
slot: "slot1"
},
{
title: '单价(元/g)',
key: 'materialUnitPrice',
align: 'center',
title: "单价(元/g)",
key: "materialUnitPrice",
align: "center",
minWidth: 80,
slot: 'slot2'
slot: "slot2"
},
{
title: '3D打印费',
align: 'center',
key: 'printPrice',
title: "3D打印费",
align: "center",
key: "printPrice",
minWidth: 60,
slot: 'slot3'
slot: "slot3"
},
{
title: '尺寸检测费',
key: 'sizeCheckPrice',
align: 'center',
title: "尺寸检测费",
key: "sizeCheckPrice",
align: "center",
minWidth: 60,
slot: 'slot4'
slot: "slot4"
},
{
title: '单价(元)',
key: 'unitPrice',
align: 'center',
title: "单价(元)",
key: "unitPrice",
align: "center",
minWidth: 60,
slot: 'slot6'
slot: "slot6"
},
{
title: '数量',
key: 'num',
align: 'center',
title: "数量",
key: "num",
align: "center",
minWidth: 70
},
{
title: '价格(元)',
key: 'price',
align: 'center',
title: "价格(元)",
key: "price",
align: "center",
minWidth: 80,
slot: 'slot7'
slot: "slot7"
},
{
title: '备注',
key: 'remark1',
align: 'center',
title: "备注",
key: "remark1",
align: "center",
minWidth: 200,
slot: 'slot5',
slot: "slot5",
tooltip: true
}
]
}
};
},
// watch: {
// row: {
......@@ -195,102 +196,105 @@ export default {
//计算3D打印费=重量(g)*单价(元/g)
return (this.row.printPrice =
parseInt(this.row.materialWeight) *
parseInt(this.row.materialUnitPrice))
parseInt(this.row.materialUnitPrice));
},
unitPrices() {
//单价=3D打印费+尺寸检测费
return (this.row.unitPrice =
parseInt(this.row.printPrice) + parseInt(this.row.sizeCheckPrice))
parseInt(this.row.printPrice) + parseInt(this.row.sizeCheckPrice));
},
prices() {
// 价格=单价*数量
return (this.row.price =
parseInt(this.row.unitPrice) * parseInt(this.row.num))
parseInt(this.row.unitPrice) * parseInt(this.row.num));
}
},
methods: {
previousStep() {
this.modalShow = false
this.modalShow = false;
},
quotationBox() {
//订单报价
let item = []
let quotationMain = {}
let item = [];
let quotationMain = {};
let data = {
quotationMain: this.formItem,
item: this.gmData
}
var url = `${PlanUrl}/quotationmain/createorupdate`
};
var url = `${PlanUrl}/quotationmain/createorupdate`;
this.$api
.post(url, data)
.then((res) => {
.then(res => {
if (res.success) {
this.$Message.success('保存成功')
this.$refs.photosensitive.modalShow = true
let id = res.result.id
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then((res) => {
console.log(res)
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id
})
this.zPhotosensitive.result = res.result
})
.catch((error) => {
this.$Message.error('请求失败')
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
},
close() {
this.modalShow = false
this.$emit('update')
this.modalShow = false;
this.$emit("update");
},
show1(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show2(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
show3(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
//备注
show4(row, index) {
this.row = row
this.row = row;
this.gmData.forEach((data, index) => {
if (this.gmData[index].mesCode === row.mesCode) {
this.gmData[index] = row
this.gmData[index] = row;
}
})
});
},
cancel() {
this.$emit("update");
}
}
}
};
</script>
<style lang="less" scoped>
.footers {
......
......@@ -105,9 +105,9 @@
</div>
</template>
<script>
import Process from '@/components/orderOperator/process'
import Process from "@/components/orderOperator/process";
export default {
name: '',
name: "",
components: {
Process
},
......@@ -118,149 +118,147 @@ export default {
},
data() {
return {
model1: '',
model1: "",
modalShow: false,
columns: [
{
title: '序号',
type: 'index',
title: "序号",
type: "index",
width: 50,
align: 'center'
align: "center"
},
{
title: '订单编号',
key: 'mesCode',
align: 'center',
title: "订单编号",
key: "mesCode",
align: "center",
minWidth: 120
},
{
title: '产品名称',
key: 'productName',
align: 'center',
title: "产品名称",
key: "productName",
align: "center",
minWidth: 80
},
{
title: '重量(g)',
key: 'materialWeight',
align: 'center',
title: "重量(g)",
key: "materialWeight",
align: "center",
minWidth: 80
},
{
title: '单价(元/g)',
key: 'materialUnitPrice',
align: 'center',
title: "单价(元/g)",
key: "materialUnitPrice",
align: "center",
minWidth: 80
},
{
title: '3D打印费',
key: 'printPrice',
align: 'center',
title: "3D打印费",
key: "printPrice",
align: "center",
minWidth: 60
},
{
title: '尺寸检测费',
key: 'sizeCheckPrice',
align: 'center',
title: "尺寸检测费",
key: "sizeCheckPrice",
align: "center",
minWidth: 60
},
{
title: '单价(元)',
key: 'unitPrice',
align: 'center',
title: "单价(元)",
key: "unitPrice",
align: "center",
minWidth: 80
},
{
title: '数量',
key: 'num',
align: 'center',
title: "数量",
key: "num",
align: "center",
minWidth: 80
},
{
title: '价格(元)',
key: 'unitPrice',
align: 'center',
title: "价格(元)",
key: "unitPrice",
align: "center",
minWidth: 80
},
{
title: '备注',
key: 'itemremark',
align: 'center',
title: "备注",
key: "itemremark",
align: "center",
minWidth: 60
}
],
dataTable: [],
dataListRetrunNew: {
schemaId: 'cf192e27-1e81-4000-98ee-392eeb539616', //订单报价的schemaId
schemaId: "cf192e27-1e81-4000-98ee-392eeb539616", //订单报价的schemaId
idList: [], //订单id List
codeList: [], //订单编号List
operatorIdList: [] //操作员id
} //确定后返回数据
}
};
},
created() {},
methods: {
submitCensorship() {
//alert(JSON.stringify(this.childData))
this.dataListRetrunNew.idList = []
this.dataListRetrunNew.codeList = []
this.dataListRetrunNew.operatorIdList = []
this.dataListRetrunNew.idList = [];
this.dataListRetrunNew.codeList = [];
this.dataListRetrunNew.operatorIdList = [];
this.dataListRetrunNew.idList.push(this.childData.result[0].quotationId)
this.dataListRetrunNew.codeList.push(this.childData.result[0].code)
let ues = this.$refs.userProcess
this.dataListRetrunNew.operatorIdList = ues.immutData
this.dataListRetrunNew.idList.push(this.childData.result[0].quotationId);
this.dataListRetrunNew.codeList.push(this.childData.result[0].code);
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
// alert('photo__' + JSON.stringify(this.dataListRetrunNew))
this.$http.order
.batchstart(this.dataListRetrunNew)
.then((res) => {
this.$http.order.batchstart(this.dataListRetrunNew).then(res => {
if (res.success) {
this.$Message.success('订单报价送审成功!')
this.$emit('on-close')
this.easySearch('')
this.modalShow = false
this.$Message.success("订单报价送审成功!");
this.$emit("update");
this.easySearch("");
this.modalShow = false;
} else {
this.$Message.error('订单报价送审失败!')
this.$Message.error("订单报价送审失败!");
}
})
});
// .catch((error) => {
// this.$Message.error('送审失败')
// })
},
//老的报价
submitCensorship1() {
var str = ''
this.childData.result.forEach((element) => {
console.log(element.orderId)
str += element.orderId + ','
})
str = str.substr(0, str.length - 1)
var str = "";
this.childData.result.forEach(element => {
console.log(element.orderId);
str += element.orderId + ",";
});
str = str.substr(0, str.length - 1);
var data = {
id: this.childData.result[0].quotationId,
auditUser: this.model1,
orderIds: str,
status: 2
}
var url = `${PlanUrl}/quotationmain/submit`
};
var url = `${PlanUrl}/quotationmain/submit`;
this.$api
.post(url, data)
.then((res) => {
this.$Message.success('送审成功')
})
.catch((error) => {
this.$Message.error('送审失败')
.then(res => {
this.$Message.success("送审成功");
})
.catch(error => {
this.$Message.error("送审失败");
});
},
previousStep() {
this.modalShow = false
this.modalShow = false;
}
}
}
};
</script>
<style lang="less" scoped>
......
......@@ -5,6 +5,7 @@
title="订单报价"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
fullscreen
footer-hide
>
......@@ -55,32 +56,32 @@
</template>
<script>
import GenerateQuotation from '../components/generateQuotation.vue' //生成报价单弹框
import GenerateQuotation from "../components/generateQuotation.vue"; //生成报价单弹框
export default {
components: {
GenerateQuotation
},
name: '',
name: "",
props: {
bjData: Array
},
data() {
return {
values1: '',
values2: '',
values3: '',
values1: "",
values2: "",
values3: "",
modalShow: false,
columns: [
{
title: '序号',
type: 'index',
title: "序号",
type: "index",
width: 50,
align: 'center'
align: "center"
},
{
title: '订单编号',
key: 'name',
align: 'center',
title: "订单编号",
key: "name",
align: "center",
minWidth: 120
},
// {
......@@ -90,286 +91,289 @@ export default {
// minWidth: 60
// },
{
title: '产品名称',
key: 'name2',
align: 'center',
title: "产品名称",
key: "name2",
align: "center",
minWidth: 80
},
{
title: '规格',
key: 'name4',
align: 'center',
title: "规格",
key: "name4",
align: "center",
minWidth: 80
},
{
title: '材料牌号',
key: 'name5',
align: 'center',
title: "材料牌号",
key: "name5",
align: "center",
minWidth: 80,
slot: 'slot6'
slot: "slot6"
},
{
title: '材料重量',
key: 'name6',
align: 'center',
title: "材料重量",
key: "name6",
align: "center",
minWidth: 80,
slot: 'slot7'
slot: "slot7"
},
{
title: '材料单价',
key: 'name7',
align: 'center',
title: "材料单价",
key: "name7",
align: "center",
minWidth: 80,
slot: 'slot8'
slot: "slot8"
},
{
title: '材料费/件(元)',
key: 'name8',
align: 'center',
title: "材料费/件(元)",
key: "name8",
align: "center",
minWidth: 70
},
{
title: '3D打印费',
align: 'center',
title: "3D打印费",
align: "center",
children: [
{
// title: '1600/H',
key: 'name9',
align: 'center',
key: "name9",
align: "center",
minWidth: 60,
className: 'conciseContent',
slot: 'slot1',
className: "conciseContent",
slot: "slot1",
renderHeader: (h, params) => {
return h('div', [
h('Input', {
return h("div", [
h("Input", {
props: {
value: '1600',
placeholder: '请输入'
value: "1600",
placeholder: "请输入"
},
on: {
'on-change': (value) => {
console.log(value)
"on-change": value => {
console.log(value);
}
}
}),
h('span', ' /H')
])
h("span", " /H")
]);
}
}
]
},
{
title: '后处理费',
align: 'center',
title: "后处理费",
align: "center",
children: [
{
// title: '200/H',
key: 'name10',
align: 'center',
key: "name10",
align: "center",
minWidth: 60,
className: 'conciseContent',
slot: 'slot2',
className: "conciseContent",
slot: "slot2",
renderHeader: (h, params) => {
return h('div', [
h('Input', {
return h("div", [
h("Input", {
props: {
value: '200',
placeholder: '请输入'
value: "200",
placeholder: "请输入"
},
on: {
'on-change': (value) => {
console.log(value)
"on-change": value => {
console.log(value);
}
}
}),
h('span', ' /H')
])
h("span", " /H")
]);
}
}
]
},
{
title: '线切割费',
align: 'center',
title: "线切割费",
align: "center",
children: [
{
title: '100/H',
key: 'name11',
align: 'center',
title: "100/H",
key: "name11",
align: "center",
minWidth: 60,
className: 'conciseContent',
slot: 'slot3',
className: "conciseContent",
slot: "slot3",
renderHeader: (h, params) => {
return h('div', [
h('Input', {
return h("div", [
h("Input", {
props: {
value: '100',
placeholder: '请输入'
value: "100",
placeholder: "请输入"
},
on: {
'on-change': (value) => {
console.log(value)
"on-change": value => {
console.log(value);
}
}
}),
h('span', ' /H')
])
h("span", " /H")
]);
}
}
]
},
{
title: '加工费单价',
key: 'name12',
align: 'center',
title: "加工费单价",
key: "name12",
align: "center",
minWidth: 60
},
{
title: '其它',
key: 'name13',
align: 'center',
title: "其它",
key: "name13",
align: "center",
minWidth: 80,
slot: 'slot4'
slot: "slot4"
},
{
title: '单价',
key: 'name14',
align: 'center',
title: "单价",
key: "name14",
align: "center",
minWidth: 60
},
{
title: '数量',
key: 'name3',
align: 'center',
title: "数量",
key: "name3",
align: "center",
minWidth: 70
},
{
title: '热处理',
key: 'name15',
align: 'center',
title: "热处理",
key: "name15",
align: "center",
minWidth: 80,
slot: 'slot5'
slot: "slot5"
},
{
title: '合计',
key: 'name16',
align: 'center',
title: "合计",
key: "name16",
align: "center",
minWidth: 80
},
{
title: '调度',
key: 'name17',
align: 'center',
title: "调度",
key: "name17",
align: "center",
minWidth: 60
}
],
data: [
{
name: 'a1233_155111_20192010',
name1: 'a002',
name2: 'W123',
name3: '250',
name4: '2019-1',
name5: '',
name6: '',
name7: '',
name8: '100',
name9: '2',
name10: '3',
name11: '5',
name12: '100',
name13: '',
name14: '',
name15: '',
name16: '',
name17: '小明'
name: "a1233_155111_20192010",
name1: "a002",
name2: "W123",
name3: "250",
name4: "2019-1",
name5: "",
name6: "",
name7: "",
name8: "100",
name9: "2",
name10: "3",
name11: "5",
name12: "100",
name13: "",
name14: "",
name15: "",
name16: "",
name17: "小明"
},
{
name: 'a1233',
name1: 'a002',
name2: 'W123',
name3: '10000',
name4: '2019-1',
name5: '',
name6: '',
name7: '',
name8: '200',
name9: '2',
name10: '3',
name11: '5',
name12: '200',
name13: '',
name14: '',
name15: '',
name16: '',
name17: '小明'
name: "a1233",
name1: "a002",
name2: "W123",
name3: "10000",
name4: "2019-1",
name5: "",
name6: "",
name7: "",
name8: "200",
name9: "2",
name10: "3",
name11: "5",
name12: "200",
name13: "",
name14: "",
name15: "",
name16: "",
name17: "小明"
},
{
name: 'a1233',
name1: 'b452',
name2: 'W123',
name3: '200000',
name4: '2019-1',
name5: '',
name6: '',
name7: '',
name8: '200',
name9: '2',
name10: '3',
name11: '5',
name12: '100',
name13: '',
name14: '',
name15: '',
name16: '',
name17: '小明'
name: "a1233",
name1: "b452",
name2: "W123",
name3: "200000",
name4: "2019-1",
name5: "",
name6: "",
name7: "",
name8: "200",
name9: "2",
name10: "3",
name11: "5",
name12: "100",
name13: "",
name14: "",
name15: "",
name16: "",
name17: "小明"
}
]
}
};
},
mounted() {},
methods: {
quotationBox() {
this.$refs.generateQuotation.modalShow = true
this.$refs.generateQuotation.modalShow = true;
},
previousStep() {
this.modalShow = false
this.modalShow = false;
},
//3D打印费
showPrinting(row, index) {
return (row.name12 =
parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
},
//后处理费
showPostProcessing(row, index) {
return (row.name12 =
parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
},
//线切割费
showWireCutting(row, index) {
return (row.name12 =
parseInt(row.name9) * 1600 +
parseInt(row.name10) * 200 +
parseInt(row.name11) * 100) //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
parseInt(row.name11) * 100); //加工费单价=3D打印时间*小时费用+后处理*小时费用+线切*小时费用
},
//其它
showOther(row, index) {
return (row.name14 =
parseInt(row.name8) + parseInt(row.name12) + parseInt(row.name13)) //单价=材料费/件(元)+加工费单价+其它
parseInt(row.name8) + parseInt(row.name12) + parseInt(row.name13)); //单价=材料费/件(元)+加工费单价+其它
},
//热处理
showHeatTreatment(row, index) {
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>
<style lang="less" scoped>
.footers {
......
......@@ -120,14 +120,14 @@
<!-- 高级搜索弹框 -->
<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>
<Photosensitive ref="photosensitive" :gmData="newJsData" @update="update"></Photosensitive>
<Metal-Details ref="metalDetail" :resultDetils="resultDetils"></Metal-Details>
<Photosensitive-Details ref="photosensitiveDetail" :resultDetils="resultDetils"></Photosensitive-Details>
<!-- 报价记录里送审 -->
<MetalQuotation-Generation ref="metalQuotationExamine" :childData="zPhotosensitive"></MetalQuotation-Generation>
<Photosensitive-Generation ref="photosensitiveExamine" :childData="zPhotosensitive"></Photosensitive-Generation>
<MetalQuotation-Generation ref="metalQuotationExamine" :childData="zPhotosensitive" @update="update"></MetalQuotation-Generation>
<Photosensitive-Generation ref="photosensitiveExamine" :childData="zPhotosensitive" @update="update"></Photosensitive-Generation>
</Layout>
</template>
......
......@@ -322,7 +322,7 @@
<OrderSendReview ref="orderSendReview"></OrderSendReview>
<div slot="footer">
<Button @click="canCelFn">取消</Button>
<Button type="primary" @click="upSave">确定送审</Button>
<Button type="primary" :disabled='sendDisable' @click="upSave">确定送审</Button>
</div>
</Modal>
<Modal
......@@ -423,6 +423,7 @@ export default {
modal1: false,
processviewModal: false, //工艺预览
documentShow: false, //工艺送审
sendDisable:false,//料单送审确定按钮
modalliao: false,
orderDatadia: false,
ProductingPreparationPeople: 0,
......@@ -1851,10 +1852,10 @@ export default {
},
upSave() {
let operatorIdList = this.$refs.orderSendReview.returnDataList()
let itemCode = this.formdata.data01.code
// this.dataListRetrunNew.codeList.push(itemCode)
let itemCode = this.formdata.data01.code// this.dataListRetrunNew.codeList.push(itemCode)
this.dataListRetrunNew.code = itemCode
this.dataListRetrunNew.operatorIdList = operatorIdList
this.sendDisable = true//防止多次点击确定送审
this.$http.order
.batchOrderStart(this.dataListRetrunNew)
.then((response) => {
......@@ -1869,6 +1870,8 @@ export default {
this.$Message.error(response.error.message)
}
this.modalInfo = false
this.sendDisable = false
this.loaddata('')
})
.catch((err) => {
console.log(err)
......
......@@ -8,8 +8,15 @@
:high="false"
:height="tdHeight"
></DataGrid>
<Modal v-model="detailModal" title="查看合格证" footer-hide width="1000" :mask-closable="false">
<Detail @on-close="cancel" @on-ok="addOk" :eid="curId" />
<Modal
v-model="detailModal"
title="查看合格证"
@on-cancel="reload"
footer-hide
width="1000"
:mask-closable="false"
>
<Detail @on-close="cancel" @on-ok="addOk" :eid="curId" ref="listDetail" />
</Modal>
</div>
</template>
......@@ -153,7 +160,9 @@ export default {
this.detailModal = false;
},
reload() {
if (this.$refs.listDetail.checkboxList.length == 0) {
this.$refs.grid.load();
}
},
detail(id) {
this.detailModal = true;
......
......@@ -106,16 +106,18 @@ export default {
easy: true,
high: true,
hide:true,
},{
key: 'reinspectionDate',
title: this.l('reinspectionDate'),
align: 'center',
render: (h, paras) => {
return h('span', paras.row.reinspectionDate)
},
high: true,
width:180,
},{
// {
// key: 'reinspectionDate',
// title: this.l('reinspectionDate'),
// align: 'center',
// render: (h, paras) => {
// return h('span', paras.row.reinspectionDate)
// },
// high: true,
// width:180,
// },
{
key: 'remainingAmount',
title: this.l('remainingAmount'),
align: 'left',
......
......@@ -270,9 +270,9 @@ export const actions = {
state.opened.splice(1, currentIndex - 1).forEach(({ name }) => commit('keepAliveRemove', name));
}
if (state.opened.length == 2) {
state.opened.splice(0, 1);
}
// if (state.opened.length == 2) {
// state.opened.splice(0, 1);
// }
state.current = pageAim;
if ($nuxt.$router.fullPath !== pageAim) {
$nuxt.$router.push(pageAim);
......@@ -329,9 +329,9 @@ export const actions = {
state.opened.splice(currentIndex + 1).forEach(({ name }) => commit('keepAliveRemove', name));
state.opened.splice(1, currentIndex - 1).forEach(({ name }) => commit('keepAliveRemove', name));
}
if (state.opened.length == 2) {
state.opened.splice(0, 1);
}
// if (state.opened.length == 2) {
// state.opened.splice(0, 1);
// }
// 设置新的页面
state.current = pageAim;
if ($nuxt.$router.fullPath !== pageAim) {
......@@ -354,11 +354,11 @@ export const actions = {
// 持久化
await dispatch('opened2db');
// 关闭所有的标签页后需要判断一次现在是不是在首页
// if ($nuxt.$router.name !== 'index') {
// $nuxt.$router.push({
// name: 'index'
// }, () => { });
// }
if ($nuxt.$router.name !== 'index') {
$nuxt.$router.push({
name: 'index'
}, () => { });
}
// end
resolve();
});
......@@ -386,9 +386,9 @@ export const mutations = {
list.splice(index, 1);
state.keepAlive = list;
}
if (state.opened.length == 2) {
state.opened.splice(0, 1);
}
// if (state.opened.length == 2) {
// state.opened.splice(0, 1);
// }
},
/**
......
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