Commit 68c6415d authored by 康振飞's avatar 康振飞

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

parents 3725670b 3cf05c0f
...@@ -550,6 +550,7 @@ export default { ...@@ -550,6 +550,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
.table-tools { .table-tools {
padding-top: 5px;
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
.table-search { .table-search {
......
...@@ -287,6 +287,37 @@ export default { ...@@ -287,6 +287,37 @@ export default {
hide: true, hide: true,
type: "date" type: "date"
}, },
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
high: true,
type: "user"
},
{
key: "creationTime",
title: this.$t("creationTime"),
align: "center",
high: true,
width: 180
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
hide: true,
align: "left",
high: true,
type: "user"
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
hide: true,
align: "center",
high: true,
width: 180
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -297,7 +328,7 @@ export default { ...@@ -297,7 +328,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", }, attrs: { oprate: "detail" },
on: { click: () => this.detail(params.row) } on: { click: () => this.detail(params.row) }
}, },
"查看" "查看"
...@@ -305,7 +336,7 @@ export default { ...@@ -305,7 +336,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "edit", }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -321,7 +352,7 @@ export default { ...@@ -321,7 +352,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "remove", }, attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -336,7 +367,7 @@ export default { ...@@ -336,7 +367,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", }, attrs: { oprate: "detail" },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && (params.row.divideMark != 0 &&
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
> >
<Row> <Row>
<Col span="6"> <Col span="6">
<FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople"> <FormItem label="生产车间" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" /> <WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" />
</FormItem> </FormItem>
</Col> </Col>
...@@ -74,36 +74,35 @@ export default { ...@@ -74,36 +74,35 @@ export default {
}, },
columns1: [ columns1: [
{ {
title: "订单编码", title: this.l("mesCode"),
key: "mesCode", key: "mesCode",
width: 180, width: 180,
tooltip: true tooltip: true
}, },
{ {
title: "任务类型", title: this.l("productName"),
key: "taskType", key: "productName",
align: "center",
width: 100,
tooltip: true tooltip: true
}, },
{ {
title: "产品名称", key: "drawnNumber",
key: "productName", title: this.l("drawnNumber"),
tooltip: true align: "center",
width: 140
}, },
{ {
title: "阶段", title: this.l("projectNumber"),
key: "stage", key: "projectNumber",
width: 80 width: 140
}, },
{ {
title: "材料", title: this.l("batchNumber"),
key: "materialId", key: "batchNumber",
width: 100, width: 120,
tooltip: true tooltip: true
}, },
{ {
title: "数量", title: this.l("quantity"),
key: "quantity", key: "quantity",
align: "right", align: "right",
width: 70 width: 70
...@@ -169,23 +168,30 @@ export default { ...@@ -169,23 +168,30 @@ export default {
return objStr; return objStr;
}, },
getTimeProductPFD(value) { getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(value); this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(
value
);
}, },
getTimeQuotationFD(value) { getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value); this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value);
}, },
getFormatDateEnd(dates) { getFormatDateEnd(dates) {
const d = new Date(dates); const d = new Date(dates);
const resDate = const resDate =
d.getFullYear() + d.getFullYear() +
"-" + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
"-" + "-" +
this.p(d.getDate())+ " 23:59:59"; this.p(d.getDate()) +
" 23:59:59";
return resDate; return resDate;
}, },
p(s) { p(s) {
return s < 10 ? "0" + s : s; return s < 10 ? "0" + s : s;
},
l(key) {
let vkey = "mes_plan" + "." + key;
return this.$t(vkey) || key;
} }
}, },
created() { created() {
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
<FormItem :label="l('departmentId')" prop="departmentId"> <FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect> <departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem> </FormItem>
</Col> <Col :span="5"> </Col>
<Col :span="5">
<FormItem :label="l('isMain')" prop="isMain"> <FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary> <Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <!--
<Col :span="12"> <Col :span="12">
<FormItem :label="l('upId')" prop="upId"> <FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> <InputNumber v-model="entity.upId"></InputNumber>
...@@ -121,23 +122,16 @@ ...@@ -121,23 +122,16 @@
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<i-quill <i-quill v-model="entity.remark" :height="300" border v-paste="handleImg" />
v-model="entity.remark"
:height="300"
border
v-paste="handleImg"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem label="多媒体附件" prop="files"> <FormItem label="多媒体附件" prop="files">
<files ref="refFile" :parms="parms" files />
<files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
...@@ -147,10 +141,10 @@ ...@@ -147,10 +141,10 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from '@/components/quill' import iQuill from "@/components/quill";
export default { export default {
name: "Add", name: "Add",
components: { components: {
iQuill iQuill
// VueUeditorWrap // VueUeditorWrap
}, },
...@@ -186,6 +180,12 @@ export default { ...@@ -186,6 +180,12 @@ export default {
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }] code: [{ required: true, message: "必填", trigger: "blur" }]
},
parms: {
app: "technology",
eid: null,
name: "",
field: ""
} }
}; };
}, },
...@@ -194,15 +194,27 @@ export default { ...@@ -194,15 +194,27 @@ export default {
eid: Number eid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.parms.eid = this.$u.guid();
this.load(this.eid); this.$refs.refFile.intFiles();
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
// this.entity.qualityTemplateName = ''
// this.entity.qualityTemplate=''
// if (this.$refs.refFile.nameList.length > 0) {
// let nameList=this.$refs.refFile.nameList
// let names=[]
// let url=[]
// nameList.forEach(e => {
// names.push(e.fileName)
// url.push(e.filePath)
// });
// this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
// this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
// }
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -224,23 +236,23 @@ export default { ...@@ -224,23 +236,23 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
handleImg(e) { handleImg(e) {
console.warn(e) console.warn(e);
let file = null let file = null;
if ( if (
e.clipboardData && e.clipboardData &&
e.clipboardData.items[0] && e.clipboardData.items[0] &&
e.clipboardData.items[0].type && e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1 e.clipboardData.items[0].type.indexOf("image") > -1
) { ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式 //这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile() file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader() let reader = new FileReader();
reader.readAsDataURL(file) reader.readAsDataURL(file);
setTimeout(() => { setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>' var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.remark += img this.entity.remark += img;
}, 1000) }, 1000);
// new R // new R
} }
......
...@@ -81,8 +81,7 @@ ...@@ -81,8 +81,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName"> <FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<Input v-model="entity.qualityTemplateName"></Input> <files ref="refFile" :parms="parms" files singleFile />
<files ref="refFile" :parms="parms" files singleFile/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -162,22 +161,25 @@ export default { ...@@ -162,22 +161,25 @@ export default {
data() { data() {
return { return {
disabled: false, disabled: false,
entity: {}, entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
}, },
routingDetailList: [], routingDetailList: [],
parms: { parms: {
app: 'qccard', app: "qccard",
eid: null, eid: this.eid,
name: '', name: "",
field: '' field: ""
} }
}; };
}, },
props: { props: {
headid: Number, headid: Number,
eName:String, eName: String,
eid: Number eid: Number
}, },
mounted() { mounted() {
...@@ -189,7 +191,7 @@ export default { ...@@ -189,7 +191,7 @@ export default {
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone() this.$refs.refFile.intFilesClone();
this.entity = r.result; this.entity = r.result;
}); });
}, },
...@@ -197,6 +199,26 @@ export default { ...@@ -197,6 +199,26 @@ export default {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.qualityTemplateName = "";
this.entity.qualityTemplate = "";
if (this.$refs.refFile.nameList.length > 0) {
let nameList = this.$refs.refFile.nameList;
let names = [];
let url = [];
nameList.forEach(e => {
names.push(e.fileName);
url.push(e.filePath);
});
this.entity.qualityTemplateName = JSON.stringify(names)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, ""); //附件本地库暂存文件名称
this.entity.qualityTemplate = JSON.stringify(url)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
}
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -231,11 +253,11 @@ export default { ...@@ -231,11 +253,11 @@ export default {
tempObj.value = data.id; tempObj.value = data.id;
tempObj.label = data.name; tempObj.label = data.name;
tempD.push(tempObj); tempD.push(tempObj);
}) });
this.routingDetailList = tempD this.routingDetailList = tempD;
}); });
}, },
l(key) { l(key) {
key = "routing_qc_card" + "." + key; key = "routing_qc_card" + "." + key;
return this.$t(key); return this.$t(key);
......
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