Commit f90079af authored by 仇晓婷's avatar 仇晓婷

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

parents 4718be5b 2688258a
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
pageSize: 20, pageSize: 20,
conditions: [], conditions: [],
}, },
searchConditions: this.search,
pageSizeOpts: [20, 50, 100], pageSizeOpts: [20, 50, 100],
tableHeight: 0, tableHeight: 0,
firstY: 0, firstY: 0,
...@@ -408,6 +409,7 @@ export default { ...@@ -408,6 +409,7 @@ export default {
}, },
reload(conditions) { reload(conditions) {
var where = []; var where = [];
this.searchConditions = conditions
if (conditions) { if (conditions) {
Object.keys(conditions).forEach((u) => { Object.keys(conditions).forEach((u) => {
let v = conditions[u].value; let v = conditions[u].value;
...@@ -482,7 +484,7 @@ export default { ...@@ -482,7 +484,7 @@ export default {
export2Excel() { export2Excel() {
//当前显示数据 //当前显示数据
var where = []; var where = [];
var conditions = this.conditions; var conditions = this.searchConditions;
if (conditions) { if (conditions) {
Object.keys(conditions).forEach((u) => { Object.keys(conditions).forEach((u) => {
let v = conditions[u].value; let v = conditions[u].value;
...@@ -496,7 +498,7 @@ export default { ...@@ -496,7 +498,7 @@ export default {
} }
}); });
v = times.join(","); v = times.join(",");
} else if (op.indexOf("In") > -1) { } else if (op.indexOf("In") > -1 && Array.isArray(v)) {
v = v.join(","); v = v.join(",");
} }
if (!this.$u.isNull(v)) { if (!this.$u.isNull(v)) {
......
<template> <template>
<div> <div>
<RadioGroup <RadioGroup v-if="type === 'radio'" ref="dicradio" v-model="name" @on-change="change" :vertical="vertical">
v-if="type === 'radio'" <Radio v-for="(item, index) in dic" :disabled="item.disabled" :label="item.value" :key="index" :border="border">
ref="dicradio"
v-model="name"
@on-change="change"
:vertical="vertical"
>
<Radio
v-for="(item, index) in dic"
:disabled="item.disabled"
:label="item.value"
:key="index"
:border="border"
>
<span :title="item.value">{{ item.label }}</span> <span :title="item.value">{{ item.label }}</span>
</Radio> </Radio>
</RadioGroup> </RadioGroup>
<CheckboxGroup <CheckboxGroup v-else-if="type === 'checkbox'" ref="dicradio" v-model="name" @on-change="change" :vertical="vertical">
v-else-if="type === 'checkbox'" <Checkbox v-for="(item, index) in dic" :disabled="item.disabled" :label="item.value" :key="index" :border="border">
ref="dicradio"
v-model="name"
@on-change="change"
:vertical="vertical"
>
<Checkbox
v-for="(item, index) in dic"
:disabled="item.disabled"
:label="item.value"
:key="index"
:border="border"
>
<span :title="item.value">{{ item.label }}</span> <span :title="item.value">{{ item.label }}</span>
</Checkbox> </Checkbox>
</CheckboxGroup> </CheckboxGroup>
<Select <Select v-else :placeholder="placeholder" v-model="name" @on-change="change" :disabled="disabled" :multiple="multiple" clearable :transfer="true">
v-else <Option v-for="(item, i) in dic" :value="item.value" :disabled="item.disabled" :key="item.value" :label="item.label">
:placeholder="placeholder"
v-model="name"
@on-change="change"
:disabled="disabled"
:multiple="multiple"
clearable
:transfer="true"
>
<Option
v-for="(item, i) in dic"
:value="item.value"
:disabled="item.disabled"
:key="item.value"
:label="item.label"
>
<span :title="item.value">{{item.label}}</span> <span :title="item.value">{{item.label}}</span>
</Option> </Option>
</Select> </Select>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
model: { model: {
...@@ -74,7 +36,7 @@ export default { ...@@ -74,7 +36,7 @@ export default {
type: String, type: String,
default: "Select" default: "Select"
}, },
border: {//radio可以选择border属性 border: { //radio可以选择border属性
type: Boolean, type: Boolean,
default: false default: false
}, },
...@@ -165,6 +127,7 @@ export default { ...@@ -165,6 +127,7 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
.w200 { .w200 {
width: 200px; width: 200px;
......
...@@ -1448,7 +1448,7 @@ export default { ...@@ -1448,7 +1448,7 @@ export default {
product_info: { product_info: {
mmcode: '物料编号', mmcode: '物料编号',
materialId: '物料', materialId: '物料',
levelId: '产品分类', levelId: '产品分类ID',
type: "类型", type: "类型",
drawingNo: '图号', drawingNo: '图号',
name: '名称', name: '名称',
...@@ -1457,7 +1457,7 @@ export default { ...@@ -1457,7 +1457,7 @@ export default {
madeCompanyTitle: '主承制单位', madeCompanyTitle: '主承制单位',
status: '', status: '',
remark: '备注', remark: '备注',
madeCompany: '主承制单位', madeCompany: '主承制单位ID',
creationTime: '创建时间', creationTime: '创建时间',
extend: '', extend: '',
productUrl: '产品图像', productUrl: '产品图像',
......
...@@ -4938,7 +4938,7 @@ ...@@ -4938,7 +4938,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "2.14.1", "version": "2.14.1",
"resolved": "http://r.cnpmjs.org/commander/download/commander-2.14.1.tgz", "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.14.1.tgz",
"integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=" "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
} }
} }
...@@ -5467,7 +5467,7 @@ ...@@ -5467,7 +5467,7 @@
}, },
"crc-32": { "crc-32": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "http://r.cnpmjs.org/crc-32/download/crc-32-1.2.0.tgz", "resolved": "https://registry.npm.taobao.org/crc-32/download/crc-32-1.2.0.tgz",
"integrity": "sha1-yy224puIUI4y2d0OwWk+e0Ghggg=", "integrity": "sha1-yy224puIUI4y2d0OwWk+e0Ghggg=",
"requires": { "requires": {
"exit-on-epipe": "~1.0.1", "exit-on-epipe": "~1.0.1",
...@@ -7364,7 +7364,7 @@ ...@@ -7364,7 +7364,7 @@
}, },
"exit-on-epipe": { "exit-on-epipe": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://r.cnpmjs.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz",
"integrity": "sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI=" "integrity": "sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
}, },
"expand-brackets": { "expand-brackets": {
...@@ -8015,7 +8015,7 @@ ...@@ -8015,7 +8015,7 @@
}, },
"frac": { "frac": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "http://r.cnpmjs.org/frac/download/frac-1.1.2.tgz", "resolved": "https://registry.npm.taobao.org/frac/download/frac-1.1.2.tgz",
"integrity": "sha1-PXT39keMiKG1AgMG10fcYxPHTQs=" "integrity": "sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
}, },
"fragment-cache": { "fragment-cache": {
...@@ -10026,7 +10026,7 @@ ...@@ -10026,7 +10026,7 @@
}, },
"iview-loader": { "iview-loader": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "http://r.cnpmjs.org/iview-loader/download/iview-loader-1.3.0.tgz", "resolved": "https://registry.npm.taobao.org/iview-loader/download/iview-loader-1.3.0.tgz",
"integrity": "sha1-n0Yu6uI4K4tJ746JLNloFJfjVLc=", "integrity": "sha1-n0Yu6uI4K4tJ746JLNloFJfjVLc=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -11762,7 +11762,7 @@ ...@@ -11762,7 +11762,7 @@
}, },
"less-loader": { "less-loader": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "http://r.cnpmjs.org/less-loader/download/less-loader-5.0.0.tgz", "resolved": "https://registry.npm.taobao.org/less-loader/download/less-loader-5.0.0.tgz?cache=0&sync_timestamp=1598354442231&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2Fless-loader-5.0.0.tgz",
"integrity": "sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY=", "integrity": "sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -15087,7 +15087,7 @@ ...@@ -15087,7 +15087,7 @@
}, },
"printj": { "printj": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "http://r.cnpmjs.org/printj/download/printj-1.1.2.tgz", "resolved": "https://registry.npm.taobao.org/printj/download/printj-1.1.2.tgz",
"integrity": "sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI=" "integrity": "sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
}, },
"private": { "private": {
...@@ -20540,7 +20540,7 @@ ...@@ -20540,7 +20540,7 @@
}, },
"script-loader": { "script-loader": {
"version": "0.7.2", "version": "0.7.2",
"resolved": "http://r.cnpmjs.org/script-loader/download/script-loader-0.7.2.tgz", "resolved": "https://registry.npm.taobao.org/script-loader/download/script-loader-0.7.2.tgz",
"integrity": "sha1-IBbbb4byX1z1baOJFdgzeLsWa6c=", "integrity": "sha1-IBbbb4byX1z1baOJFdgzeLsWa6c=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -21128,7 +21128,7 @@ ...@@ -21128,7 +21128,7 @@
}, },
"ssf": { "ssf": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "http://r.cnpmjs.org/ssf/download/ssf-0.10.3.tgz", "resolved": "https://registry.npm.taobao.org/ssf/download/ssf-0.10.3.tgz",
"integrity": "sha1-jq4fwpyQpVLnkhII+BiS1vd6yys=", "integrity": "sha1-jq4fwpyQpVLnkhII+BiS1vd6yys=",
"requires": { "requires": {
"frac": "~1.1.2" "frac": "~1.1.2"
...@@ -23778,7 +23778,7 @@ ...@@ -23778,7 +23778,7 @@
}, },
"wmf": { "wmf": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://r.cnpmjs.org/wmf/download/wmf-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/wmf/download/wmf-1.0.2.tgz",
"integrity": "sha1-fRnWIQcaCMK9xrfmiKnENSmMwto=" "integrity": "sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
}, },
"word-wrap": { "word-wrap": {
...@@ -23933,7 +23933,7 @@ ...@@ -23933,7 +23933,7 @@
}, },
"xlsx": { "xlsx": {
"version": "0.15.6", "version": "0.15.6",
"resolved": "http://r.cnpmjs.org/xlsx/download/xlsx-0.15.6.tgz", "resolved": "https://registry.npm.taobao.org/xlsx/download/xlsx-0.15.6.tgz?cache=0&sync_timestamp=1597272342311&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2Fxlsx-0.15.6.tgz",
"integrity": "sha1-Rh+EHW2eoag3XizSRr8jrs4IodU=", "integrity": "sha1-Rh+EHW2eoag3XizSRr8jrs4IodU=",
"requires": { "requires": {
"adler-32": "~1.2.0", "adler-32": "~1.2.0",
...@@ -23948,7 +23948,7 @@ ...@@ -23948,7 +23948,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "2.17.1", "version": "2.17.1",
"resolved": "http://r.cnpmjs.org/commander/download/commander-2.17.1.tgz", "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz",
"integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=" "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78="
} }
} }
......
<template> <template>
<div class="h100"> <div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" exportTitle="导入中心"> <DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
......
...@@ -736,7 +736,73 @@ export default { ...@@ -736,7 +736,73 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
],
columns6: [{
title: this.l6("name"),
key: "name",
align: "left",
},
{
key: "mmcode",
title: this.l6("mmcode"),
align: "center",
high: true,
},
{
key: "levelTitle",
title: this.l6("levelTitle"),
align: "left",
high: true,
},
{
key: "levelId",
title: this.l6("levelId"),
align: "left",
high: true,
hide: true,
import: true,
},
{
key: "drawingNo",
title: this.l6("drawingNo"),
align: "right",
high: true,
},
{
key: "madeCompanyTitle",
title: this.l6("madeCompanyTitle"),
align: "center",
width: 260,
high: true,
},
{
key: "madeCompany",
title: this.l6("madeCompany"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
{
key: "version",
title: this.l6("version"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
{
key: "materialId",
title: this.l6("materialId"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
], ],
tdHeightExcel: "", tdHeightExcel: "",
excelData: [], excelData: [],
...@@ -1086,6 +1152,9 @@ export default { ...@@ -1086,6 +1152,9 @@ export default {
case 5: case 5:
this.loadColum(this.columns5); this.loadColum(this.columns5);
break; break;
case 6:
this.loadColum(this.columns6);
break;
default: default:
this.loadColum(this.columns0); this.loadColum(this.columns0);
} }
...@@ -1121,6 +1190,9 @@ export default { ...@@ -1121,6 +1190,9 @@ export default {
case 5: case 5:
this.importRountingBom(); this.importRountingBom();
break; break;
case 6:
this.importProductMix();
break;
default: default:
//this.loadColum(this.columns1); //this.loadColum(this.columns1);
} }
...@@ -1459,7 +1531,50 @@ export default { ...@@ -1459,7 +1531,50 @@ export default {
return routingHeaderId return routingHeaderId
}, },
//插入工艺规程 及工艺相关end //插入工艺规程 及工艺相关end
//插入产品管理
importProductMix() {
let tempData = this.$u.clone(this.dataIm);
let tempList = [];
tempData.forEach((ele) => {
let obj = {
mmcode: ele.mmcode ? ele.mmcode : '',
drawingNo: ele.drawingNo ? ele.drawingNo : '',
name: ele.name ? ele.name : '',
type: ele.type ? ele.type : 1,
madeCompany: ele.madeCompany ? ele.madeCompany : null,
madeCompanyTitle: ele.madeCompanyTitle ? ele.madeCompanyTitle : "",
version: ele.version ? ele.version : 0,
productUrl: "",
productUrlList: "",
levelId: ele.levelId ? ele.levelId : null,
levelTitle: ele.levelTitle ? ele.levelTitle : "",
materialId: ele.materialId ? ele.materialId : "",
};
if (ele.name && ele.name != '') {
tempList.push(obj);
}
});
if (tempList.length == 0) {
this.$Message.error("所有导入的数据均不合法!");
} else {
let parms = {
list: tempList,
};
let url = `${technologyUrl}productinfoimportservice/import`;
this.$api.post(url, parms).then((r) => {
if (r.success) {
this.$Message.success("成功批量导入产品管理模块 " + tempList.length + " 条数据");
this.imBtn = false;
this.cancelExcel();
} else {
this.$Message.error("批量导入失败")
}
}).catch(err => {
this.$Message.error("数据异常!");
});
}
},
//切换列表和excel按钮 //切换列表和excel按钮
changeExcel(val) { changeExcel(val) {
if (val == 1) { if (val == 1) {
...@@ -1495,6 +1610,10 @@ export default { ...@@ -1495,6 +1610,10 @@ export default {
key = "routingsupporting" + "." + key; key = "routingsupporting" + "." + key;
return this.$t(key); return this.$t(key);
}, },
l6(key) {
key = "product_info" + "." + key;
return this.$t(key);
},
}, },
watch: { watch: {
eid(v) { eid(v) {
......
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