Commit 2066cccd authored by 周远喜's avatar 周远喜

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

parents 3da3304b 29f584a0
......@@ -19,13 +19,19 @@
</div>
<div class="fg">
<div class="tree">
<Tree :data="data" :render="renderContent" ref="tree" @on-select-change="change"></Tree>
<Tree
:data="data"
:render="renderContent"
ref="tree"
@on-select-change="change"
></Tree>
</div>
</div>
</div>
</template>
<script>
import { forEach } from "lodash";
export default {
name: "",
data() {
......@@ -64,7 +70,24 @@ export default {
},
"upId"
);
this.list = this.$u.clone(data);
let creatorUserId = this.$store.state.userInfo.userId;
console.log(creatorUserId);
let list = this.$u.clone(data);
let newlist = [];
list.filter((e, index) => {
let userIds = [];
let obj = {};
if (e.upId == 0) {
userIds = e.userIds.split(",");
userIds.forEach((v) => {
if (creatorUserId == v) {
newlist.push(e);
}
});
}
});
// console.log(newlist);
this.list = newlist;
});
},
toggle() {
......@@ -124,6 +147,7 @@ export default {
let items = this.$u.clone(this.list);
let expand = this.expand;
let result = [];
search(this.keys, items);
function search(keys, data) {
data.map((u) => {
......
......@@ -124,7 +124,7 @@ export default {
// pageIndex: 1,
departmentId: id,
type: this.type,
roleTitle: this.roleTitle,
roleTitle: this.roleTitle, //检验
// pageSize: 0
};
if (this.type == 99) { //开发组
......
......@@ -946,6 +946,7 @@ export default {
taskCode: '甲方任务号',
putintDocmentCode: '甲方投产输入文件(编号)',
technologyDocmentCode: '甲方技术输入文件(编号)',
productionType:'生产类型'
},
mes_part_task_plan_simulate: {
id: '',
......
<template>
<div style="padding: 0;" class="excute">
<DataGrid
style="margin-top:2px; margin-bottom: -5px;"
:columns="columns"
ref="grid"
:easy="false"
:high="false"
:set="false"
:border="false"
:data="data1"
:height="gridHeight"
:page="false"
:size="size"
></DataGrid>
<div style="padding: 0;" class="excute">
<DataGrid style="margin-top:2px; margin-bottom: -5px;" :columns="columns" ref="grid" :easy="false" :high="false" :set="false" :border="false" :data="data1" :height="gridHeight" :page="false" :size="size"></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "../../aps/api";
import Edit from "./edit";
......@@ -29,7 +18,9 @@ export default {
Add
},
props: {
rowId: { type: Number }
rowId: {
type: Number
}
},
data() {
return {
......@@ -47,8 +38,10 @@ export default {
curId: 0,
gridHeight: 150,
size: "small",
columns: [
{ title: " ", width: 130 },
columns: [{
title: " ",
width: 130
},
{
key: "task_seq",
title: this.l("task_seq"),
......@@ -109,7 +102,14 @@ export default {
hide: true
},
{
key: "first_equip",
key: "equip_type",
title: this.l("equip_type"),
align: "left",
easy: true,
high: true
},
{
key: "firsT_EQUIP_CODE",
title: this.l("first_equip"),
align: "left",
easy: true,
......@@ -282,7 +282,9 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h("op", {
attrs: {
icon: "md-create",
......@@ -290,7 +292,9 @@ export default {
title: "編輯工序",
oprate: "edit"
},
on: { click: () => this.edit(params.row) }
on: {
click: () => this.edit(params.row)
}
}),
h("op", {
attrs: {
......@@ -300,7 +304,9 @@ export default {
oprate: "delete",
msg: "确认要刪除工序吗?"
},
on: { click: () => this.remove(params.row, params.index) }
on: {
click: () => this.remove(params.row, params.index)
}
})
]);
}
......@@ -323,7 +329,10 @@ export default {
mounted() {
this.loadData(this.rowId);
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -385,6 +394,7 @@ export default {
}
};
</script>
<style lang="less">
.excute table tr th span,
.excute table tr td {
......
......@@ -13,7 +13,7 @@
</FormItem>
</Col>
<Col :span="12">
<FormItem label="首选资源" prop="resourceType">
<FormItem label="首选资源" prop="resource">
<ResourceSelectCode v-model="entity.resource" @on-change="resourceChange"></ResourceSelectCode>
</FormItem>
</Col>
......@@ -51,10 +51,11 @@ export default {
message: "必填",
trigger: "blur"
}],
resourceType: [{
resource: [{
required: true,
message: "请选择首选资源",
trigger: "change",
type: 'array'
}, ],
},
single: false
......@@ -69,10 +70,10 @@ export default {
}
},
methods: {
load(v) {
this.entity = v;
// load(v) {
// this.entity = v;
},
// },
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
......@@ -135,9 +136,9 @@ export default {
this.entity.resourceCode = v[1];
this.entity.resourceId = items[1].id;
if (v != null && v.length > 0) {
this.rules.resourceType[0].required = false;
this.rules.resource[0].required = false;
} else {
this.rules.resourceType[0].required = true;
this.rules.resource[0].required = true;
}
},
l(key) {
......@@ -160,7 +161,6 @@ export default {
this.entity.resourceCode = v.first_equip;
let code = v.first_equip;
this.entity.resource = []
//let code = 'PCZYBZBH_20200804_1'
if (code && code != '') {
this.resources.forEach(e => {
if (e.code == code) {
......
......@@ -211,8 +211,7 @@ export default {
title: this.l("equip_type"),
align: "left",
easy: true,
high: true,
hide: true
high: true
},
{
key: "first_equip",
......@@ -470,8 +469,8 @@ export default {
//编辑工序start----
edit(row) {
this.editModal = true;
this.rowData = row;
this.editModal = true;
},
//编辑工序end----
......
<template>
<div class="h100 table-content1">
<div class="h100 table-content1">
<p class="mb10">
订单编号:{{mesCodes}}
<span class="ml20">产品名称:{{productNames}}</span>
<span class="ml20">生产数量:{{counts}}</span>
订单编号:{{ mesCodes }}
<span class="ml20">产品名称:{{ productNames }}</span>
<span class="ml20">生产数量:{{ counts }}</span>
<span class="fr mr20" v-if="false">
<a href="javascript:;">出库单</a>
</span>
......@@ -12,58 +12,120 @@
</span>
</p>
<div class="mb70" v-for="(item,i) in datas" :key="i">
<p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p>
<Table border :columns="cols" :data="item.suport" :ref="'table'+item.routingHeaderId" class="tableCommon" @on-selection-change="selectionChange(i)" @on-select-cancel="selectListCancel" @on-select-all-cancel="selectAllCancel" @on-select="selectList" @on-select-all="selectListAll">
<div class="mb70" v-for="(item, i) in datas" :key="i">
<p class="fwBold">
{{ item.routingHeader }}------{{ item.routingHeaderCode }}
</p>
<Table
border
:columns="cols"
:data="item.suport"
:ref="'table' + item.routingHeaderId"
class="tableCommon"
@on-selection-change="selectionChange(i)"
@on-select-cancel="selectListCancel"
@on-select-all-cancel="selectAllCancel"
@on-select="selectList"
@on-select-all="selectListAll"
>
<template slot-scope="{ row, index }" slot="counts">
<InputNumber :max="row.totalCount-row.applicationNumber" :min="0" v-model="row.count" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" />
<InputNumber
:max="row.totalCount - row.applicationNumber"
:min="0"
v-model="row.count"
@on-change="inputChange1(i, row, index)"
:disabled="row._disabled"
/>
</template>
<template slot-scope="{ row, index }" slot="remarks">
<Input type="text" v-model="row.remark" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" />
<Input
type="text"
v-model="row.remark"
@on-change="inputChange1(i, row, index)"
:disabled="row._disabled"
/>
</template>
</Table>
</div>
<FooterToolbar v-show="footerToolbar" class="ftball pt10">
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form :model="orderForm" :inline="true" :label-width="0" ref="formValidate" :rules="ruleValidate">
<Form
:model="orderForm"
:inline="true"
:label-width="0"
ref="formValidate"
:rules="ruleValidate"
>
<FormItem prop="QuotationFinishDate">
<DatePicker v-model="orderForm.QuotationFinishDate" type="date" style="color:black" placeholder="请选择齐套日期" @on-change="getTimeQuotationFD"></DatePicker>
<DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
style="color: black"
placeholder="请选择齐套日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem>
<FormItem l><Button type="primary" class="mr10 ml10" @click="application">申请配套</Button></FormItem>
<FormItem l
><Button type="primary" class="mr10 ml10" @click="application"
>申请配套</Button
></FormItem
>
</Form>
</FooterToolbar>
<Modal v-model="modalAccessoryList" :title="title" fullscreen footer-hide>
<component :is="detailAcc" :eid="orderId" :mesCode="mesCodes" :productName="productNames" :drawnNumber="drawnNumber" :count="counts" @on-close="cancel" @on-ok="onOk" />
<component
:is="detailAcc"
:eid="orderId"
:mesCode="mesCodes"
:productName="productNames"
:drawnNumber="drawnNumber"
:count="counts"
@on-close="cancel"
@on-ok="onOk"
/>
</Modal>
<Modal v-model="modalAccSet" title="临时设置" footer-hide width="800">
<Form :model="entity" :label-width="110" ref="formValidateSet" :rules="ruleValidate">
<Form
:model="entity"
:label-width="110"
ref="formValidateSet"
:rules="ruleValidate"
>
<Row>
<Col span="12">
<FormItem label="工序">{{entity.routingDetailName}}</FormItem>
<FormItem label="工序">{{ entity.routingDetailName }}</FormItem>
</Col>
<Col span="12">
<FormItem label="物料名">{{entity.materialName}}</FormItem>
<FormItem label="物料名">{{ entity.materialName }}</FormItem>
</Col>
<Col span="12">
<FormItem label="物料编号">{{entity.materialNumber}}</FormItem>
<FormItem label="物料编号">{{ entity.materialNumber }}</FormItem>
</Col>
<Col span="12">
<FormItem label="需求数量">{{entity.needCount}}</FormItem>
<FormItem label="需求数量">{{ entity.needCount }}</FormItem>
</Col>
<Col span="12">
<FormItem label="已申请">{{entity.applicationNumber}}</FormItem>
<FormItem label="已申请">{{ entity.applicationNumber }}</FormItem>
</Col>
<Col span="12">
<FormItem label="可再申请" prop="count">
<InputNumber :max="entity.needCount-entity.applicationNumber" :min="0" v-model="entity.count" />
<InputNumber
:max="entity.needCount - entity.applicationNumber"
:min="0"
v-model="entity.count"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="齐套日期" prop="finishDate">
<DatePicker v-model="entity.finishDate" type="date" placeholder="请选择齐套日期" @on-change="getTimeFinish"></DatePicker>
<DatePicker
v-model="entity.finishDate"
type="date"
placeholder="请选择齐套日期"
@on-change="getTimeFinish"
></DatePicker>
</FormItem>
</Col>
<Col span="24">
......@@ -73,14 +135,16 @@
</Col>
<Col span="24">
<p class="fr">
<Button type="primary" class="mr10 ml10" @click="application1">申请配套</Button>
<Button type="primary" class="mr10 ml10" @click="application1"
>申请配套</Button
>
<Button @click="canelSet">取消</Button>
</p>
</Col>
</Row>
</Form>
</Modal>
</div>
</div>
</template>
<script>
......@@ -98,7 +162,8 @@ export default {
curId: 0,
editIndex: -1,
editNum: "",
cols: [{
cols: [
{
type: "selection",
width: 70,
align: "center",
......@@ -148,7 +213,8 @@ export default {
width: "120",
render: (h, params) => {
return h(
"op", {
"op",
{
attrs: {
oprate: "detail",
},
......@@ -157,9 +223,9 @@ export default {
},
},
params.row._disabled &&
params.row.totalCount - params.row.applicationNumber > 0 ?
"临时申请" :
""
params.row.totalCount - params.row.applicationNumber > 0
? "临时申请"
: ""
);
},
},
......@@ -177,22 +243,28 @@ export default {
counts: this.count,
curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: {
QuotationFinishDate: [{
QuotationFinishDate: [
{
required: true,
message: "_",
trigger: "change",
}, ],
finishDate: [{
},
],
finishDate: [
{
required: true,
message: "请选择齐套日期",
trigger: "change",
}, ],
count: [{
},
],
count: [
{
required: true,
message: "请输入申请数量",
type: "number",
trigger: "change",
}, ],
},
],
},
tempList: [],
cRow: null,
......@@ -219,20 +291,18 @@ export default {
productName: String,
drawnNumber: String,
count: Number,
productingPreparationPeople: Number,
},
mounted() {
this.load(this.eid);
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
load(v) {
Api.matchdetaillist({
id: v
id: v,
}).then((r) => {
if (r.success) {
r.result.forEach((e) => {
......@@ -367,6 +437,7 @@ export default {
creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate,
orderCode: this.mesCode,
productingPreparationPeople: this.productingPreparationPeople,
},
items: temItems,
};
......
<template>
<div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" @on-selection-change="selectInfo" :batch="false">
<div class="h100">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
@on-selection-change="selectInfo"
:batch="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input search enter-button placeholder="请输入关键字订单编号/项目名称" v-model="easySearch.keys.value" v-width="300" @on-search="search" />
<Input
search
enter-button
placeholder="请输入关键字订单编号/项目名称"
v-model="easySearch.keys.value"
v-width="300"
@on-search="search"
/>
</FormItem>
</Form>
</template>
<template slot="searchBack">
<Badge :count="this.$store.state.countAps" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAps">
<Badge
:count="this.$store.state.countAps"
overflow-count="99"
style="margin-right: 15px"
type="info"
v-if="showAps"
>
<a href="javascript:;" @click="goAps">APS排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge :count="this.$store.state.countAi" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAi">
<Badge
:count="this.$store.state.countAi"
overflow-count="99"
style="margin-right: 15px"
type="info"
v-if="showAi"
>
<a href="javascript:;" @click="goAi">智能排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge :count="this.$store.state.countAll" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAll">
<Badge
:count="this.$store.state.countAll"
overflow-count="99"
style="margin-right: 15px"
type="info"
v-if="showAll"
>
<a @click="goCemplate">整机排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge :count="this.$store.state.countRun" overflow-count="99" type="info" v-if="showRun">
<Badge
:count="this.$store.state.countRun"
overflow-count="99"
type="info"
v-if="showRun"
>
<a @click="goStream">流水排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
</template>
......@@ -29,11 +65,15 @@
</DataGrid>
<FooterToolbar extra v-if="footerBar" class="ftball">
<Row>
<Checkbox @on-change="handleSelectAll(single)" v-model="single">全选</Checkbox>
<span class="footerSpan">已选 {{selectCount}} 项</span>
<Checkbox @on-change="handleSelectAll(single)" v-model="single"
>全选</Checkbox
>
<span class="footerSpan">已选 {{ selectCount }} 项</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="modalDispatch">工艺派发</Button>&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="modalSchedule">移入排产</Button>&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="modalDispatch">工艺派发</Button
>&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="modalSchedule">移入排产</Button
>&nbsp;&nbsp;&nbsp;&nbsp;
<Button @click="canselFooter">取消</Button>
</Row>
</FooterToolbar>
......@@ -46,7 +86,12 @@
<Modal v-model="detailModal" title="详情">
<Detail :eid="curId" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<Modal
v-model="deletelModal"
title="删除"
@on-ok="removeOk"
@on-cancel="cancel"
>
<p>确定删除?</p>
</Modal>
<Modal v-model="dispatchModal" title="工艺派发" footer-hide width="800">
......@@ -65,11 +110,15 @@
@on-change="onchangeScheduleType"
></Dictionary>
-->
<RadioGroup v-model="scheduleType" class="radioList" @on-change="onchangeScheduleType">
<Radio :label="1" border :disabled="this.$store.state.countAi>0">
<RadioGroup
v-model="scheduleType"
class="radioList"
@on-change="onchangeScheduleType"
>
<Radio :label="1" border :disabled="this.$store.state.countAi > 0">
<span>Aps排产</span>
</Radio>
<Radio :label="4" border :disabled="this.$store.state.countAps>0">
<Radio :label="4" border :disabled="this.$store.state.countAps > 0">
<span>智能排产</span>
</Radio>
<Radio :label="2" border>
......@@ -79,10 +128,11 @@
<span>流水排产</span>
</Radio>
</RadioGroup>
<p class="pl30 pt10" v-show="scheduleType!=null">
<p class="pl30 pt10" v-show="scheduleType != null">
确定将订单
<span class="fwBold">{{resultsOrderList}}</span> 移入
<span class="red fwBold">{{scheduleTypeName}}</span>
<span class="fwBold">{{ resultsOrderList }}</span> 移入
<span class="red fwBold">{{ scheduleTypeName }}</span
>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
......@@ -91,13 +141,28 @@
<Button type="primary" @click="scheduleOk">确定</Button>
</div>
</Modal>
<Modal v-model="orderSupportModal" title="配套下发" footer-hide width="1300">
<Modal
v-model="orderSupportModal"
title="配套下发"
footer-hide
width="1300"
>
<orderSupport ref="orderSupport"></orderSupport>
</Modal>
<Modal v-model="modalAccessory" :title="title" fullscreen footer-hide>
<component :is="details" :eid="orderId" :mesCode="mesCode" :productName="productName" :drawnNumber="drawnNumber" :count="count" @on-close="cancel" @on-ok="addOk" />
<component
:is="details"
:eid="orderId"
:mesCode="mesCode"
:productName="productName"
:drawnNumber="drawnNumber"
:productingPreparationPeople="productingPreparationPeople"
:count="count"
@on-close="cancel"
@on-ok="addOk"
/>
</Modal>
</div>
</div>
</template>
<script>
......@@ -121,6 +186,7 @@ export default {
data() {
return {
action: Api.index,
productingPreparationPeople: 0,
easySearch: {
keys: {
op: "mesCode,projectNumber",
......@@ -135,7 +201,8 @@ export default {
scheduleModal: false,
orderSupportModal: false,
curId: 0,
statuList: this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
statuList:
this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
name: "",
items: null,
title: "",
......@@ -148,9 +215,10 @@ export default {
drawnNumber: "",
count: 0,
modalAccessory: false,
columns: [{
columns: [
{
key: "selection",
title: '多选',
title: "多选",
type: "selection",
width: 50,
align: "center",
......@@ -190,7 +258,8 @@ export default {
align: "center",
render: (h, params) => {
return h(
"op", {
"op",
{
attrs: {
oprate: "detail",
},
......@@ -273,7 +342,7 @@ export default {
align: "left",
easy: true,
high: true,
hide: true
hide: true,
},
{
key: "productingPreparationPeople",
......@@ -281,14 +350,14 @@ export default {
align: "left",
high: true,
hide: true,
type: 'workShopName'
type: "workShopName",
},
{
key: "productingPreparationFinishDate",
title: this.l("productingPreparationFinishDate"),
align: "left",
high: true,
hide: true
hide: true,
},
{
key: "quotationPeople",
......@@ -296,14 +365,14 @@ export default {
align: "left",
high: true,
hide: true,
type: "user"
type: "user",
},
{
key: "quotationFinishDate",
title: this.l("quotationFinishDate"),
align: "left",
high: true,
hide: true
hide: true,
},
{
key: "demandStartDate",
......@@ -311,7 +380,7 @@ export default {
align: "left",
high: true,
hide: true,
type: "date"
type: "date",
},
{
key: "demandFinishDate",
......@@ -319,7 +388,7 @@ export default {
align: "left",
high: true,
hide: true,
type: "date"
type: "date",
},
// {
// key: "spareQty",
......@@ -356,15 +425,21 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "detail",
title: params.row.mainRoutingSetStatus == 0 ?
"工艺派发" : "移入排产",
title:
params.row.mainRoutingSetStatus == 0
? "工艺派发"
: "移入排产",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
......@@ -372,23 +447,29 @@ export default {
on: {
click: () =>
params.row.mainRoutingSetStatus == 0 ||
params.row.mainRoutingSetStatus == 1 ?
this.goMethod(params.row) : null,
},
},
params.row.mainRoutingSetStatus == 0 && params.row.isPreschedule == 0 ?
"工艺派发" :
params.row.mainRoutingSetStatus == 1 && params.row.isPreschedule == 0 ?
"移入排产" :
""
params.row.mainRoutingSetStatus == 1
? this.goMethod(params.row)
: null,
},
},
params.row.mainRoutingSetStatus == 0 &&
params.row.isPreschedule == 0
? "工艺派发"
: params.row.mainRoutingSetStatus == 1 &&
params.row.isPreschedule == 0
? "移入排产"
: ""
),
h(
"op", {
"op",
{
attrs: {
oprate: "detail",
title: params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3 ?
"配套派发" : "",
title:
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? "配套派发"
: "",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
......@@ -396,16 +477,18 @@ export default {
on: {
click: () =>
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3 ?
this.supportDis(params.row) : null,
params.row.isSupportingFinish == 3
? this.supportDis(params.row)
: null,
},
},
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3 ?
"配套派发" :
""
params.row.isSupportingFinish == 3
? "配套派发"
: ""
),
]);
]
);
},
},
],
......@@ -433,10 +516,7 @@ export default {
mounted() {
this.loadInitCount();
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -457,13 +537,13 @@ export default {
let statueArry = [];
let tempmesCodeList = [];
this.resultsStatusArr = [];
this.isPrescheduleStatu = 0
this.isPrescheduleStatu = 0;
value.forEach((data) => {
var that = this;
statueArry.push(data.id);
this.resultsStatusArr.push(data.mainRoutingSetStatus);
if (data.isPreschedule == 2) {
this.isPrescheduleStatu = 2
this.isPrescheduleStatu = 2;
}
tempmesCodeList.push(data.mesCode);
});
......@@ -653,7 +733,7 @@ export default {
},
removeOk() {
Api.delete({
id: this.curId
id: this.curId,
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
......@@ -732,7 +812,7 @@ export default {
loadInitCount() {
let currentUserId = this.$store.state.userInfo.userId;
let para = {
id: currentUserId
id: currentUserId,
};
Api.listbyuser(para).then((datas) => {
if (datas.success && datas.result && datas.result.length > 0) {
......@@ -803,6 +883,8 @@ export default {
this.productName = row.productName;
this.drawnNumber = row.drawnNumber;
this.count = row.quantity;
this.productingPreparationPeople = row.productingPreparationPeople;
if (row.mainRoutingSetStatus == 1 && row.isSupportingFinish == 0) {
this.$Message.error("请去工艺设置生成料单!");
// this.title = "申请配套";
......
<template>
<div class="result-aps">
<div class="result-aps">
<Row class="expand-row">
<Col span="4">
<span class="expand-key">工序序号</span>
......@@ -20,7 +20,7 @@
<span class="expand-key">计划结束时间</span>
</Col>
<Col span="3">
<span class="expand-key">设备编号</span>
<span class="expand-key">首选资源</span>
</Col>
</Row>
<Row v-for="(item,index) in dataList" :key="item.index">
......@@ -46,8 +46,9 @@
<span>{{ item.equip_id }}</span>
</Col>
</Row>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
......@@ -76,18 +77,21 @@ export default {
}
};
</script>
<style lang='less'>
<style lang="less">
.result-aps {
.expand-row {
text-align: center;
margin: 5px 0;
font-weight: bold;
}
.expand-value {
text-align: center;
margin: 3px 0;
}
}
td.ivu-table-expanded-cell {
padding: 0 !important;
}
......
<template>
<div class="pdf-detail table-detail">
<div class="cerioficate-pdf-detail">
<div class="bian-hao">产品合格证编号:{{results.serialNumber}}</div>
<div class="bian-hao">产品合格证编号:{{ results.serialNumber }}</div>
<div class="body-d">
<Row class="row-border right-border">
<Col :span="4" class="col-border">用户单位</Col>
<Col :span="20" class="col-border">{{results.userUnit}}</Col>
<Col :span="20" class="col-border">{{ results.userUnit }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">任务依据</Col>
<Col :span="20" class="col-border">{{results.taskBased}}</Col>
<Col :span="20" class="col-border">{{ results.taskBased }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{results.productName}}</Col>
<Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col>
<Col :span="8" class="col-border">{{ results.productName }}</Col>
<!-- <Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col> -->
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品编号</Col>
<Col :span="8" class="col-border">{{results.productSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.productSerialNumber
}}</Col>
<Col :span="4" class="col-border">原材料批号</Col>
<Col :span="8" class="col-border">{{results.materialSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialSerialNumber
}}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料编号</Col>
<Col :span="8" class="col-border">{{results.materialCode}}</Col>
<Col :span="8" class="col-border">{{ results.materialCode }}</Col>
<Col :span="4" class="col-border">产品代号(图号)</Col>
<Col :span="8" class="col-border">{{results.productCode}}</Col>
<Col :span="8" class="col-border">{{ results.productCode }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料合格证编号</Col>
<Col :span="8" class="col-border">{{results.materialCertificationNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialCertificationNumber
}}</Col>
<Col :span="4" class="col-border">数量</Col>
<Col :span="8" class="col-border">{{results.productQuantity}}</Col>
<Col :span="8" class="col-border">{{ results.productQuantity }}</Col>
</Row>
<!-- <Row class="row-border right-border">
<Col :span="4" class="col-border">增材制造批次号</Col>
......@@ -50,73 +56,84 @@
<Col :span="5" class="col-border">结论</Col>
<Col :span="5" class="col-border">备注</Col>
</Row>
<Row class="row-border right-border" v-for="(item,index) in results.items" :key="index">
<Col :span="1" class="col-border">{{index+1}}</Col>
<Col :span="5" class="col-border">{{item.name}}</Col>
<Col :span="5" class="col-border">{{item.require}}</Col>
<Col :span="3" class="col-border">{{item.result}}</Col>
<Col :span="5" class="col-border">{{item.conclusion}}</Col>
<Col :span="5" class="col-border">{{item.remark}}</Col>
<Row
class="row-border right-border"
v-for="(item, index) in results.items"
:key="index"
>
<Col :span="1" class="col-border">{{ index + 1 }}</Col>
<Col :span="5" class="col-border">{{ item.name }}</Col>
<Col :span="5" class="col-border">{{ item.require }}</Col>
<Col :span="3" class="col-border">{{ item.result }}</Col>
<Col :span="5" class="col-border">{{ item.conclusion }}</Col>
<Col :span="5" class="col-border">{{ item.remark }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">结论</Col>
<Col :span="20" class="col-border">{{results.conclusion}}</Col>
<Col :span="20" class="col-border">{{ results.conclusion }}</Col>
</Row>
<Row class="row-border right-border bottom-border">
<Col :span="4" class="col-border">检验员 / 时间</Col>
<Col :span="8" class="col-border">{{results.examUser}} {{results.examDate}}</Col>
<Col :span="8" class="col-border">
<User :value="parseInt(results.examUser)" />&nbsp;{{
results.examDate
}}</Col
>
<Col :span="4" class="col-border">批准人 / 时间</Col>
<Col :span="8" class="col-border">{{results.approveUser}} {{results.approveDate}}</Col>
<Col :span="8" class="col-border">
<User :value="parseInt(results.approveUser)" />&nbsp;
{{ results.approveDate }}</Col
>
</Row>
</div>
</div>
</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 {
results: {
state: ''
}
}
state: "",
},
};
},
created() {
this.dataImmut = []
this.dataMut = []
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then((r) => {
if (r.success) {
this.results = JSON.parse(r.result.formData)
this.results = JSON.parse(r.result.formData);
// let formStr = r.result.formData.replace(/\"/g, '"')
// this.results = JSON.parse(formStr)[0]
} else {
this.$Message.error('加载失败')
this.$Message.error("加载失败");
}
})
});
},
methods: {
load(v) {},
l(key) {
key = 'waitOpened' + '.' + key
return this.$t(key)
}
key = "waitOpened" + "." + key;
return this.$t(key);
},
watch: {}
}
},
watch: {},
};
</script>
<style lang="less" scoped>
.pdf-detail {
......
......@@ -69,36 +69,36 @@ export default {
{
key: "code",
title: this.l("code"),
align: "left",
align: "center",
easy: true,
high: true,
},
{ key: "total", title: this.l("total"), high: true },
{ key: "total", title: this.l("total"), high: true, align: "center" },
{
key: "nowTotal",
title: this.l("nowTotal"),
high: true,
},
{ key: "batch", title: this.l("batch"), align: "left", high: true },
{
key: "certificateOfApproval",
title: this.l("certificateOfApproval"),
align: "left",
align: "center",
high: true,
},
{
key: "unitPrice",
title: this.l("unitPrice"),
// { key: "batch", title: this.l("batch"), align: "left", high: true },
// {
// key: "certificateOfApproval",
// title: this.l("certificateOfApproval"),
// align: "left",
// high: true,
// },
// {
// key: "unitPrice",
// title: this.l("unitPrice"),
high: true,
},
{
key: "originalManufacturer",
title: this.l("originalManufacturer"),
align: "left",
high: true,
},
// high: true,
// },
// {
// key: "originalManufacturer",
// title: this.l("originalManufacturer"),
// align: "left",
// high: true,
// },
{
key: "creationTime",
title: this.l("creationTime"),
......@@ -108,7 +108,7 @@ export default {
{
key: "creator",
title: this.l("creatorUserId"),
align: "left",
align: "center",
high: true,
},
{
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Form ref="form" :model="entity" :label-width="90">
<Row>
<Col :span="12">
<FormItem label="名称" prop="name">
<FormItem label="名称" prop="name" :rules="{required: true, message: '必填', trigger: 'blur'}">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
......@@ -37,7 +37,9 @@
</div>
<Row>
<Col v-for="li in fileds" :key="li.field" :span="li.span">
<FormItem :label="li.title" :prop="li.name">
<!-- type: li.dataType==1?'number':li.dataType==4?'date':'string' -->
<!-- :rules="li.required?{required: true, message: '必填', trigger: 'blur', }:''" -->
<FormItem :label="li.title" :prop="li.field" >
<Input v-if="li.dataType==0" v-model="entity[li.field]"></Input>
<InputNumber
v-if="li.dataType==1||li.dataType==2"
......
<template>
<div class="master-data">
<DataGrid :columns="cols" ref="grid" :conditions="easySearch" :action="action" :initsearch="sets" :high="false" :format="formatFun" :height="tableHeight" @on-selection-change="onSelect" :exportTitle="exportTitle">
<div class="master-data">
<DataGrid
:columns="cols"
ref="grid"
:conditions="easySearch"
:action="action"
:initsearch="sets"
:high="false"
:format="formatFun"
:height="tableHeight"
@on-selection-change="onSelect"
:exportTitle="exportTitle"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入编码/名称/状态" v-width="200" v-model="easySearch.keys.value" clearable />
<Input
placeholder="请输入编码/名称/状态"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -20,11 +36,36 @@
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false" :fullscreen="fullscreen">
<component :is="detail" :eid="curId" :rootCategoryId="rootCategoryId" :rowsTable="rowsTable" :nodeInfo="nodeInfo" @on-close="cancel" @on-cancel="cancel" @on-ok="ok" ref="chlidren" />
<Modal
v-model="modal"
:title="title"
width="1000"
footer-hide
:mask-closable="false"
:fullscreen="fullscreen"
>
<component
:is="detail"
:eid="curId"
:rootCategoryId="rootCategoryId"
:rowsTable="rowsTable"
:nodeInfo="nodeInfo"
@on-close="cancel"
@on-cancel="cancel"
@on-ok="ok"
ref="chlidren"
/>
</Modal>
<ImportExcel ref="importExcel" @on-get-data="getData" :modalTitle="temTitle" :columns="cols" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
</div>
<ImportExcel
ref="importExcel"
@on-get-data="getData"
:modalTitle="temTitle"
:columns="cols"
:open="ModalIm"
@on-cancel="ModalImCancel"
@on-ok="ok"
/>
</div>
</template>
<script>
......@@ -51,24 +92,25 @@ export default {
codeRuleData: [],
detail: null,
temTitle: "物料管理",
sets: v => {
sets: (v) => {
v.categoryId = this.nodeInfo.categoryId;
v.rootCategoryId = this.nodeInfo.rootCategoryId;
},
easySearch: {
keys: {
op: "code,name",
value: null
value: null,
},
categoryId: {
op: "In",
value: this.nodeInfo.ids
}
value: this.nodeInfo.ids,
},
},
columns: [{
columns: [
{
type: "selection",
width: 70,
align: "center"
align: "center",
},
{
key: "codeRuleType",
......@@ -81,43 +123,34 @@ export default {
{
key: "codeRuleId",
title: "编码名称",
materialKey: '3',
materialKey: "3",
import: true,
hide: true,
render: (h, params) => {
return h(
"span", {},
this.getType3(params.row.codeRuleId)
);
}
return h("span", {}, this.getType3(params.row.codeRuleId));
},
},
{
key: "rootCategoryId",
title: "大类",
align: "right",
materialKey: '1',
materialKey: "1",
import: true,
hide: true,
render: (h, params) => {
return h(
"span", {},
this.getType1(params.row.rootCategoryId)
);
}
return h("span", {}, this.getType1(params.row.rootCategoryId));
},
},
{
key: "categoryId",
title: "子类",
align: "right",
materialKey: '2',
materialKey: "2",
import: true,
hide: true,
render: (h, params) => {
return h(
"span", {},
this.getType2(params.row.categoryId)
);
}
return h("span", {}, this.getType2(params.row.categoryId));
},
},
{
key: "code",
......@@ -125,20 +158,23 @@ export default {
align: "left",
render: (h, params) => {
return h(
"a", {
"a",
{
props: {},
on: {
click: () => this.details(params.row)
}
click: () => this.details(params.row),
},
!params.row.code || params.row.code == 0 ? "未分配" : params.row.code
},
!params.row.code || params.row.code == 0
? "未分配"
: params.row.code
);
}
},
},
{
key: "name",
title: "名称",
align: "left"
align: "left",
},
{
key: "status",
......@@ -150,26 +186,26 @@ export default {
key: "version",
title: "版本",
align: "left",
code: "material.main.version"
code: "material.main.version",
},
{
key: "drawing",
title: "图号",
align: "left"
align: "left",
},
{
key: "creationTime",
title: "创建时间",
hide: true,
align: "left",
type: "date"
type: "date",
},
{
key: "creatorUserId",
title: "创建人",
hide: true,
align: "left",
type: "user"
type: "user",
},
{
title: "操作",
......@@ -177,60 +213,64 @@ export default {
width: 150,
align: "left",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "edit"
oprate: "edit",
},
on: {
click: () => this.edit(params.row)
}
click: () => this.edit(params.row),
},
},
"编辑"
params.row.status == 3 ? "" : "编辑"
),
h(
"op", {
"op",
{
attrs: {
oprate: "delete"
oprate: "delete",
},
on: {
click: () => this.remove(params.row.id)
}
click: () => this.remove(params.row.id),
},
},
params.row.status == 3 ? "" : "删除"
),
h(
"op", {
"op",
{
attrs: {
oprate: "edit"
oprate: "edit",
},
on: {
click: () => this.send(params.row)
}
click: () => this.send(params.row),
},
},
(params.row.status == 0 || params.row.status == 1) &&
this.status == 0 ?
"送审" :
""
)
]);
}
}
this.status == 0
? "送审"
: ""
),
]
);
},
},
], //基础咧
cols: [], //
status: null,
ModalIm: false,
addCol: [],
exportTitle: '物料管理',
exportTitle: "物料管理",
};
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
......@@ -242,15 +282,15 @@ export default {
this.initCols();
}
Api.getbyid({
id: "b6303ddc-8b5e-40a3-a51b-294657d1d913"
}).then(r => {
id: "b6303ddc-8b5e-40a3-a51b-294657d1d913",
}).then((r) => {
this.status = r.result.status; //status为0的话为启用,有送审,为1的话,流程是禁用的,没有送审按钮
this.nodeInfo.status = this.status;
});
},
mounted() {
this.getTreeData()
this.getcodeRuleData()
this.getTreeData();
this.getcodeRuleData();
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
......@@ -262,7 +302,7 @@ export default {
methods: {
//格式化原始数据
formatFun(data) {
data.map(e => {
data.map((e) => {
if (e.status == 0) {
e._disabled = false;
} else {
......@@ -290,32 +330,34 @@ export default {
this.$refs.grid.reload(this.easySearch);
},
initCols(delay) {
let conditions = [{
let conditions = [
{
conditionalType: "Equal",
fieldName: "categoryId",
fieldValue: this.nodeInfo.rootCategoryId
}];
fieldValue: this.nodeInfo.rootCategoryId,
},
];
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
isDesc: false,
}).then((r) => {
if (r.result) {
var items = r.result.filter(u => {
var items = r.result.filter((u) => {
return (
!this.columns.some(p => {
!this.columns.some((p) => {
return p.key == u.field;
}) && u.dataType != 5
);
});
this.addCol = items;
this.cols = this.$u.clone(this.columns);
let extra = items.map(u => {
let extra = items.map((u) => {
// console.log(u);
var col = {
key: u.field,
title: u.title
title: u.title,
};
if (u.dataType == 3) {
col.code = u.note;
......@@ -328,7 +370,7 @@ export default {
"material.main.unitName"
);
let item = units.filter(p => {
let item = units.filter((p) => {
return p.code == u.unitName;
});
// console.log(units, item);
......@@ -370,7 +412,7 @@ export default {
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.reload(this.easySearch);
this.$Message.success("删除成功");
......@@ -409,18 +451,17 @@ export default {
//导入功能
openModalIm() {
if (this.nodeInfo.categoryId) {
this.ModalIm = true
this.ModalIm = true;
} else {
this.$Message.error("请先选择分类");
}
},
ModalImCancel() {
this.ModalIm = false
this.ModalIm = false;
},
getData(val) {
let url = `${material}/materialimportservice/import`;
this.$refs.importExcel.deelData(url, this.cols, this.formatMethod(val))
this.$refs.importExcel.deelData(url, this.cols, this.formatMethod(val));
},
//根据页面二次处理数据
formatMethod(val) {
......@@ -428,9 +469,9 @@ export default {
let tempList = [];
tempData.forEach((ele) => {
let obj = {
name: ele.name ? ele.name : '',
version: ele.version ? Number(ele.version) : '',
drawing: ele.drawing ? ele.drawing : '',
name: ele.name ? ele.name : "",
version: ele.version ? Number(ele.version) : "",
drawing: ele.drawing ? ele.drawing : "",
description: ele.description ? ele.description : "",
code: 0,
status: this.nodeInfo.status == 1 ? 3 : 0,
......@@ -438,72 +479,70 @@ export default {
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
rootCategoryId: this.nodeInfo.rootCategoryId, //左侧树点击的数据的最顶层id
codeRuleType: this.nodeInfo.codeRuleType
codeRuleType: this.nodeInfo.codeRuleType,
};
this.addCol.forEach(el => {
obj[el.field] = ele[el.field]
})
if (ele.name && ele.name != '') {
obj.ico = false
this.addCol.forEach((el) => {
obj[el.field] = ele[el.field];
});
if (ele.name && ele.name != "") {
obj.ico = false;
} else {
obj.ico = true
obj.ico = true;
}
tempList.push(obj);
});
return tempList
return tempList;
},
//批量导入end
//物料大类和子类的解析start
getTreeData() {
let data = {
conditions: []
conditions: [],
};
Api.list(data).then((r) => {
this.treeData = r.result
this.treeData = r.result;
});
},
getType1(val) {
let tempTreeList = this.$u.clone(this.treeData)
let rootName = ""
tempTreeList.forEach(ele => {
let tempTreeList = this.$u.clone(this.treeData);
let rootName = "";
tempTreeList.forEach((ele) => {
if (ele.upId == 0 && ele.id == val) {
rootName = ele.name
rootName = ele.name;
}
})
return rootName
});
return rootName;
},
getType2(val) {
let tempTreeList = this.$u.clone(this.treeData)
let childrenName = ""
tempTreeList.forEach(ele => {
let tempTreeList = this.$u.clone(this.treeData);
let childrenName = "";
tempTreeList.forEach((ele) => {
if (ele.upId > 0 && ele.id == val) {
childrenName = ele.name
childrenName = ele.name;
}
})
return childrenName
});
return childrenName;
},
//获取编码名称
getcodeRuleData() {
let data = {
conditions: []
conditions: [],
};
Api.pagedSlecet(data).then((r) => {
if (r.success) {
this.codeRuleData = r.result.items || []
this.codeRuleData = r.result.items || [];
}
});
},
getType3(val) {
let codeRuleDataList = this.$u.clone(this.codeRuleData)
let codeRuleName = ""
codeRuleDataList.forEach(ele => {
let codeRuleDataList = this.$u.clone(this.codeRuleData);
let codeRuleName = "";
codeRuleDataList.forEach((ele) => {
if (ele.id == val) {
codeRuleName = ele.name
codeRuleName = ele.name;
}
})
return codeRuleName
});
return codeRuleName;
},
//物料大类和子类的解析end
},
......@@ -511,7 +550,7 @@ export default {
nodeInfo: {
handler(newName, oldName) {
// console.log("ovo", newName, oldName);
this.temTitle = "物料管理(" + newName.rootCategoryName + ")"
this.temTitle = "物料管理(" + newName.rootCategoryName + ")";
if (newName.rootCategoryId) {
this.initCols(() => {
if (newName.categoryId) {
......@@ -525,9 +564,9 @@ export default {
}
},
immediate: true,
deep: true
deep: true,
},
},
}
};
</script>
......
......@@ -58,7 +58,12 @@
</Col>
</Row>
<Row>
<Col span="24">
<Col span="8">
<FormItem label="生产类型" style="width:100%" prop="productionType">
<dictionary style="width:240px" code="plan.order.productionType" v-model="orderSearchForm.productionType"></dictionary>
</FormItem>
</Col>
<Col span="16">
<FormItem label="任务要求" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder />
</FormItem>
......
......@@ -67,6 +67,12 @@
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('productionType')}}</span>
<p>
<state code="plan.order.productionType" :value="entity.productionType" type="text"></state>
</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('productingPreparationPeople')}}</span>
<p>
......@@ -79,10 +85,6 @@
<User v-model="entity.quotationPeople" v-if="entity.quotationPeople>0"></User>
</p>
</Col>
<Col span="8">
<span class="fwBold">&nbsp;</span>
<p>&nbsp;</p>
</Col>
</Row>
<Row class="lastRow">
<Col span="24">
......
......@@ -61,6 +61,11 @@
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('productionType')" style="width:100%" prop="productionType">
<dictionary style="width:240px" code="plan.order.productionType" v-model="orderSearchForm.productionType"></dictionary>
</FormItem>
</Col>
<Col span="24">
<FormItem :label="l('taskRequire')" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder />
......
......@@ -179,6 +179,14 @@ export default {
code: "plan.order.taskType",
width: 100
},
{
key: "productionType",
title: this.l("productionType"),
align: "center",
high: true,
code: "plan.order.productionType",
width: 100
},
{
key: "quantity",
title: this.l("quantity"),
......
<template>
<div class="monitoring h100">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<div class="monitoring h100">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline style="margin-top:5px;">
<FormItem prop="productingpreparationpeople" style="width:200px">
<departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect>
<Form
ref="formInline"
:model="easySearch"
inline
style="margin-top: 5px"
>
<FormItem prop="productingpreparationpeople" style="width: 200px">
<departmentSelect
v-model="easySearch.productingpreparationpeople.value"
:type="3"
></departmentSelect>
</FormItem>
<FormItem prop="keys">
<Input placeholder="请输入订单编号" v-model="easySearch.keys.value" />
<Input
placeholder="请输入订单编号"
v-model="easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -19,23 +35,62 @@
</template>
</DataGrid>
<Modal v-model="suspendModal" title="暂停原因" footer-hide class="suspend">
<Suspend @on-close="cancel" @on-ok="suspendOk" ref="addBug" :rowSuspend="rowSuspend" />
<Suspend
@on-close="cancel"
@on-ok="suspendOk"
ref="addBug"
:rowSuspend="rowSuspend"
/>
</Modal>
<Modal v-model="recordModal" title="暂停记录" fullscreen footer-hide class="recordM">
<Record :eid="recordId" />
<Modal
v-model="recordModal"
title="暂停记录"
fullscreen
footer-hide
class="recordM"
>
<component :is="detail" :eid="recordId" @on-close="cancel" />
<!-- <Record :eid="recordId" /> -->
</Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" :load="loading" @on-close="clsoeSpeedModal" :executeId="dispatchExecuteId" :orderId="orderId" />
<Modal
v-model="SpeedModal"
title="工单信息"
fullscreen
footer-hide
class="recordM"
>
<Speed
:result="result"
:load="loading"
@on-close="clsoeSpeedModal"
:executeId="dispatchExecuteId"
:orderId="orderId"
/>
</Modal>
<Modal v-model="recycleModal" title="确定回收订单" width="600" class="suspend">
<Form ref="form" :model="recovery" :rules="rulesRecycle" :label-width="120">
<Modal
v-model="recycleModal"
title="确定回收订单"
width="600"
class="suspend"
>
<Form
ref="form"
:model="recovery"
:rules="rulesRecycle"
:label-width="120"
>
<Row>
<Col :span="24">
<FormItem :label="l('mesCode')">{{mesCode}}</FormItem>
<FormItem :label="l('mesCode')">{{ mesCode }}</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('demandFinishDate')" prop="demandFinishDate">
<DatePicker type="date" placeholder="请选择日期" style="width:240px" v-model="recovery.demandFinishDate"></DatePicker>
<DatePicker
type="date"
placeholder="请选择日期"
style="width: 240px"
v-model="recovery.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
......@@ -45,26 +100,27 @@
<Button type="primary" @click="changeFinishiDate">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Suspend from "./suspend";
import Record from "./record";
// import Record from "./record";
import Search from "./search";
import Speed from "./speed";
export default {
name: "index",
components: {
Record,
// Record,
Search,
Suspend,
Speed,
},
data() {
return {
detail: null,
result: [],
dispatchExecuteId: null, //任务id
orderId: null, //订单id
......@@ -76,11 +132,11 @@ export default {
easySearch: {
keys: {
op: "mesCode",
value: null
value: null,
},
productingpreparationpeople: {
op: "Equal",
value: null
value: null,
},
},
suspendModal: false,
......@@ -88,11 +144,12 @@ export default {
deletelModal: false,
recycleModal: false,
curId: 0,
columns: [{
columns: [
{
key: "id",
title: this.l("id"),
hide: true,
align: "left"
align: "left",
},
{
title: "序号",
......@@ -118,7 +175,8 @@ export default {
params.row.mesCode,
[
h(
"Poptip", {
"Poptip",
{
props: {
content: "开工预警:" + params.row.startWarning + "条",
trigger: "hover",
......@@ -129,7 +187,8 @@ export default {
},
[
h(
params.row.startWarning > 0 ? "Badge" : "", {
params.row.startWarning > 0 ? "Badge" : "",
{
props: {
type: "warning",
// count: 2,
......@@ -155,7 +214,8 @@ export default {
]
),
h(
"Poptip", {
"Poptip",
{
props: {
content: "完工预警:" + params.row.finishWarning + "条",
trigger: "hover",
......@@ -163,7 +223,8 @@ export default {
},
[
h(
params.row.finishWarning > 0 ? "Badge" : "", {
params.row.finishWarning > 0 ? "Badge" : "",
{
props: {
type: "info",
// count: 2,
......@@ -239,9 +300,9 @@ export default {
return h(
"span",
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params.row.actualStartDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualStartDate
params.row.actualStartDate == "0001-01-01 00:00:00"
? ""
: params.row.actualStartDate
);
},
},
......@@ -255,9 +316,9 @@ export default {
return h(
"span",
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params.row.actualFinishDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualFinishDate
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
);
},
},
......@@ -278,14 +339,16 @@ export default {
render: (h, params) => {
return h("div", [
h(
"ButtonGroup", {
"ButtonGroup",
{
props: {
shape: "circle",
},
},
[
h(
"Button", {
"Button",
{
style: {
background: "#e4e6ed ",
borderColor: "#e4e6ed ",
......@@ -299,7 +362,8 @@ export default {
params.row.unstartCount //未开工数
),
h(
"Button", {
"Button",
{
style: {
background: "#ffc000",
borderColor: "#ffc000",
......@@ -330,7 +394,8 @@ export default {
params.row.stopCount //暂停数
),
h(
"Button", {
"Button",
{
style: {
background: "#27c149",
borderColor: "#27c149",
......@@ -361,22 +426,27 @@ export default {
width: 100,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "record",
class: "edit"
class: "edit",
},
on: {
click: () => this.record(params.row.id)
click: () => this.record(params.row.id),
},
},
"暂停记录"
),
]);
]
);
},
},
{
......@@ -385,16 +455,19 @@ export default {
width: 100,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
(params.row.status == 5 && params.row.upSplitId == 0) ||
(params.row.status == 5 &&
params.row.upSplitId > 0 &&
params.row.splitCardStatus == 1) ?
"Button" :
"", //订单状态暂停,启动
params.row.splitCardStatus == 1)
? "Button"
: "", //订单状态暂停,启动
{
props: {
type: "error",
......@@ -441,9 +514,9 @@ export default {
""
),
h(
params.row.status == 5 && params.row.splitCardStatus == 0 ?
"op" :
"", //订单状态执行中,暂停
params.row.status == 5 && params.row.splitCardStatus == 0
? "op"
: "", //订单状态执行中,暂停
{
attrs: {
icon: "md-sync",
......@@ -459,7 +532,8 @@ export default {
},
}
),
]);
]
);
},
},
],
......@@ -470,20 +544,19 @@ export default {
},
mesCode: "",
rulesRecycle: {
demandFinishDate: [{
demandFinishDate: [
{
required: true,
message: "请选择计划完成时间",
trigger: "change",
type: "date",
}, ],
},
],
},
};
},
mounted() {},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -491,6 +564,7 @@ export default {
this.$refs.grid.reload(this.easySearch);
},
record(id) {
this.detail = () => import("./record");
this.recordModal = true;
this.recordId = id;
},
......@@ -529,7 +603,7 @@ export default {
// this.curId = 0
},
start(row) {
this.laster = this.$store.state.userInfo.userId,
(this.laster = this.$store.state.userInfo.userId),
this.$Modal.confirm({
title: "提示",
content: "<p>确定要启动,是否继续?</p>",
......@@ -564,7 +638,7 @@ export default {
removeOk() {
Api.delete({
id: this.curId
id: this.curId,
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
......@@ -640,7 +714,7 @@ export default {
</script>
<style lang="less">
.ivu-btn-group>.ivu-btn {
.ivu-btn-group > .ivu-btn {
height: 21px !important;
}
......
......@@ -105,7 +105,7 @@ export default {
type: "user",
},
{
key: "laster",
key: "lastModifierUserId",
title: this.l("laster"),
easy: true,
high: true,
......@@ -192,10 +192,6 @@ export default {
eid: Number,
},
mounted() {
// this.$refs.grid.reload(this.easySearch);
// if (this.eid) {
// this.loadList();
// }
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
......@@ -214,9 +210,8 @@ export default {
//格式化原始数据
formatFun(data) {
data.map((e) => {
if (e.laster) {
if (e.laster || e.creator) {
e.laster = parseInt(e.laster);
} else if (e.creator) {
e.creator = parseInt(e.creator);
}
});
......
import Api from '@/plugins/request'
export default {
index: `${PlanUrl}/orderexecutenew/paged_img`,
index: `${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`,
paged(params) {
return Api.post(`${PlanUrl}/orderexecutenew/paged_img`, params);
return Api.post(`${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`, params);
},
getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
......
......@@ -2,7 +2,7 @@
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('title')" prop="title" style="width:95%">
<FormItem :label="l('title')" prop="title" style="width: 95%">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
......@@ -22,7 +22,13 @@
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content ">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
<i-quill
v-model="entity.content"
:height="300"
border
v-paste="handleImg"
/>
<!-- <Input v-model="entity.content" type="textarea" :rows="5"></Input> -->
</FormItem>
</Col>
</Row>
......@@ -34,8 +40,12 @@
</template>
<script>
import Api from "./api";
import iQuill from "@/components/quill";
export default {
name: "Add",
components: {
iQuill,
},
data() {
return {
entity: {
......@@ -76,6 +86,27 @@ export default {
}
},
methods: {
handleImg(e) {
console.warn(e);
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.content += img;
}, 1000);
// new R
}
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
......
......@@ -2,7 +2,7 @@
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('title')" prop="title" style="width:95%">
<FormItem :label="l('title')" prop="title" style="width: 95%">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
......@@ -22,7 +22,13 @@
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content ">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
<i-quill
v-model="entity.content"
:height="300"
border
v-paste="handleImg"
/>
<!-- <Input v-model="entity.content" type="textarea" :rows="5"></Input> -->
</FormItem>
</Col>
</Row>
......@@ -34,8 +40,12 @@
</template>
<script>
import Api from "./api";
import iQuill from "@/components/quill";
export default {
name: "Edit",
components: {
iQuill,
},
data() {
return {
entity: {},
......@@ -90,6 +100,27 @@ export default {
}
});
},
handleImg(e) {
console.warn(e);
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.content += img;
}, 1000);
// new R
}
},
handleClose() {
this.$emit("on-close");
},
......
......@@ -13,7 +13,10 @@
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字名称" v-model="easySearch.keys.value" />
<Input
placeholder="请输入关键字名称"
v-model="easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -23,20 +26,20 @@
<!-- <template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>-->
<template slot="card" slot-scope="{row}">
<template slot="card" slot-scope="{ row }">
<div class="card_body">
<Row class="title_i">
<Col :span="21">工艺名称:{{row.title}}</Col>
<Col :span="21">工艺名称:{{ row.title }}</Col>
<Col :span="3" class="btn_click">
<!-- <a @click="edit(row.id)">
<Icon type="ios-create" @click="edit(row.id)" />
</a>-->
<!-- <a @click="view(row.id)">
<a @click="view(row.id)">
<Icon type="ios-paper" />
</a>
<a @click="remove(row.id)">
<!-- <a @click="remove(row.id)">
<Icon type="ios-trash" />
</a>-->
</a> -->
</Col>
</Row>
<div class="down_text">
......@@ -48,12 +51,16 @@
</div>
</Col>
<Col span="18">
<p>创建时间:{{row.creationTime}}</p>
<p>创建人:{{row.creator}}</p>
<p>内容:{{row.content}}</p>
<p>创建时间:{{ row.creationTime }}</p>
<p>创建人:{{ row.creator }}</p>
<p>内容:{{ row.content }}</p>
<p>
状态:
<state code="processCase.status" :value="row.status+''" type="text" />
<state
code="processCase.status"
:value="row.status + ''"
type="text"
/>
</p>
</Col>
</Row>
......@@ -78,12 +85,12 @@
</div>-->
</template>
</DataGrid>
<!-- <Modal v-model="modal" :title="title" width="800" footer-hide :mask-closable="false">
<Modal v-model="modal" :title="title" width="800" footer-hide :mask-closable="false">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel" :mask-closable="false">
<!-- <Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel" :mask-closable="false">
<p>确定删除?</p>
</Modal>-->
</Modal> -->
</div>
</template>
<script>
......
......@@ -89,11 +89,12 @@
}
.img_box {
text-align: center;
margin: auto;
line-height: 350px;
font-size: 32px;
width: 750px;
height: 350px;
background: #ddd;
// background: #ddd;
margin: 10px 0 0 170px;
}
}
......
<template>
<div class="wu_bg">
<div class="wu_bg">
<div class="mass_box">
<div class="mass_list">
<h2 class="btn_play">未完工({{cardlist.length}}
......@@ -8,13 +7,7 @@
<Button class="button" type="primary" @click="rechecked">反选</Button>
</h2>
<div class="list01">
<Tag
type="dot" :checkable="true"
class="tag_card" size="large"
v-for="(item,index) in cardlist"
:name="item.id" :key="index" :checked="item.checked"
color="primary" @on-change="changeCards"
>{{item.prefix}}.{{item.code}}</Tag>
<Tag type="dot" :checkable="true" class="tag_card" size="large" v-for="(item,index) in cardlist" :name="item.id" :key="index" :checked="item.checked" color="primary" @on-change="changeCards">{{item.prefix}}.{{item.code}}</Tag>
</div>
</div>
<div class="chuanse">
......@@ -31,16 +24,7 @@
</Button>
</h2>
<div class="list02">
<Tag
type="dot"
class="tag_card02"
v-for="(item,index) in hegelist"
:key="index"
:name="item.id"
:checkable="false"
closable
@on-close="hegeClose"
>{{item.prefix}}.{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in hegelist" :key="index" :name="item.id" :checkable="false" closable @on-close="hegeClose">{{item.prefix}}.{{ item.code}}</Tag>
</div>
</div>
<div class="mass_list rangbu" v-if="ranglist.length>0">
......@@ -52,12 +36,7 @@
</Button>
</h2>
<div class="list02">
<Tag
type="dot" class="tag_card02"
v-for="(item,index) in ranglist" :key="index"
:name="item.id" :checkable="false"
closable @on-close="handleClose"
>{{item.prefix}}.{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in ranglist" :key="index" :name="item.id" :checkable="false" closable @on-close="handleClose">{{item.prefix}}.{{ item.code}}</Tag>
</div>
</div>
<div class="mass_list fanxiu_box" v-if="fanlist.length>0">
......@@ -68,12 +47,7 @@
</Button>
</h2>
<div class="list02">
<Tag
type="dot" class="tag_card02"
v-for="(item,index) in fanlist" :key="index"
:name="item.id" :checkable="false"
closable @on-close="fanClose"
>{{item.prefix}}.{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in fanlist" :key="index" :name="item.id" :checkable="false" closable @on-close="fanClose">{{item.prefix}}.{{ item.code}}</Tag>
</div>
</div>
<div class="mass_list fei_box" v-if="feilist.length>0">
......@@ -84,32 +58,16 @@
</Button>
</h2>
<div class="list02">
<Tag
type="dot" class="tag_card02"
v-for="(item,index) in feilist" :key="item.id"
:name="item.id" :checkable="false"
closable @on-close="feiClose"
>{{item.prefix}}.{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in feilist" :key="item.id" :name="item.id" :checkable="false" closable @on-close="feiClose">{{item.prefix}}.{{ item.code}}</Tag>
</div>
</div>
<div class="fei_right" v-if="feilist.length>0">
<Form :model="orderForm" :label-width="110" :rules="rules" ref="formValidate">
<FormItem label="问题原因:" prop="question" style="width:100%">
<Select v-model="orderForm.question" style="width:80%">
<Option value class="option-text">请选择</Option>
<!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" -->
<Option
v-for="item in problemList"
:value="item.problem"
:key="item.index"
>{{ item.problem }}</Option>
</Select>
<dictionary style="width:240px" code="orderList.UnqualifiedReasons" v-model="orderForm.question"></dictionary>
</FormItem>
<FormItem label="责任归属:" prop="useroption" style="width:100%">
<Select v-model="orderForm.useroption" style="width:80%">
<Option value class="option-text">请选择</Option>
<Option v-for="item in blameList" :value="item.user" :key="item.index">{{ item.user }}</Option>
</Select>
<UserSelect ref="userSelected" v-model="orderForm.useroption" />
</FormItem>
</Form>
</div>
......@@ -132,14 +90,17 @@
<Modal v-model="suModal" :title="mTitle" @on-ok="okModal">
<p>是否全部取消?</p>
</Modal>
</div>
</div>
</template>
<script>
import Api from "../api";
import OrderSendReview from "./orderSendReview";
export default {
name: "starOrder",
components: { OrderSendReview },
components: {
OrderSendReview
},
data() {
return {
checkedflag: false,
......@@ -148,22 +109,20 @@ export default {
mTitle: "确认弹框",
num: "",
surMasg: "",
entity: {},//获取展示数据
entity: {}, //获取展示数据
rules: {
question: [
{
question: [{
required: true,
message: "请选择问题原因",
trigger: "change"
}
],
useroption: [
{
trigger: "change",
type: 'number'
}],
useroption: [{
required: true,
message: "请选择责任人",
trigger: "change"
}
]
trigger: "change",
type: 'number'
}]
},
orderForm: {
question: "",
......@@ -174,23 +133,16 @@ export default {
ranglist: [],
fanlist: [],
feilist: [],
titleCode: '',//送审单号
problemList: [
{ problem: "问题描述01",id:1 },
{ problem: "问题描述02",id:2 },
{ problem: "问题描述03",id:3 }
],
blameList: [
{ user: "责任人01",id:1 },
{ user: "责任人02",id:2 },
{ user: "责任人03",id:3 }
]
titleCode: '', //送审单号
};
},
created() {
this.loadFun();
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
......@@ -204,24 +156,26 @@ export default {
methods: {
loadFun() {
let pid = Number(this.$route.query.id); // JSON.stringify()
Api.getpaged({ id: pid }).then(res => {
Api.getpaged({
id: pid
}).then(res => {
if (res.success) {
let resoult = res.result;
resoult.filter(u => {
u.checked = false;
if(u.productStatus==1){
if (u.productStatus == 1) {
this.hegelist.push(u)
}
if(u.productStatus==2){
if (u.productStatus == 2) {
this.feilist.push(u)
}
if(u.productStatus==3){
if (u.productStatus == 3) {
this.ranglist.push(u)
}
if(u.productStatus==4){
if (u.productStatus == 4) {
this.fanlist.push(u)
}
if(u.productStatus==0){
if (u.productStatus == 0) {
this.cardlist.push(u)
}
});
......@@ -230,7 +184,9 @@ export default {
.catch(e => {
this.$Message.error("连接错误");
});
Api.orderanddispatchinfos({ id: pid }).then(res=>{
Api.orderanddispatchinfos({
id: pid
}).then(res => {
if (res.success && res.result) {
this.entity = res.result;
}
......@@ -313,18 +269,14 @@ export default {
},
// 让步关闭
handleClose(event, name) {
let rangold = this.ranglist;
let index = this.ranglist.findIndex(item => {
let rangold = this.$u.clone(this.ranglist);
let ind = this.ranglist.findIndex(item => {
return item.id === name;
});
let itemlist = rangold.filter(item => {
if (item.id === name) {
item.productStatus = 0
return item;
}
});
this.ranglist.splice(index, 1);
this.cardlist.splice(0, 0, itemlist[0]);
rangold[ind].productStatus = 0
rangold[ind].checked = false
this.cardlist.push(rangold[ind]);
this.ranglist.splice(ind, 1);
},
consoleFun(u) {
this.suModal = true;
......@@ -358,18 +310,14 @@ export default {
this.hegelist = [];
},
hegeClose(event, name) {
let hegeold = this.hegelist;
let hegeold = this.$u.clone(this.hegelist);
let ind = this.hegelist.findIndex(hgitem => {
return hgitem.id === name;
});
let hgtemlist = hegeold.filter(hgtem => {
if (hgtem.id == name) {
hgtem.productStatus = 0
return hgtem;
}
});
hegeold[ind].productStatus = 0
hegeold[ind].checked = false
this.cardlist.push(hegeold[ind]);
this.hegelist.splice(ind, 1);
this.cardlist.splice(0, 0, hgtemlist[0]);
},
cansolRang() {
let rangblist = this.ranglist;
......@@ -380,18 +328,15 @@ export default {
this.ranglist = [];
},
fanClose(event, name) {
let fanold = this.fanlist;
let inde = this.fanlist.findIndex(item => {
let fanold = this.$u.clone(this.fanlist);
let ind = this.fanlist.findIndex(item => {
return item.id === name;
});
let utemlist = fanold.filter(utem => {
if (utem.id == name) {
utem.productStatus = 0
return utem;
}
});
this.fanlist.splice(inde, 1);
this.cardlist.splice(0, 0, utemlist[0]);
fanold[ind].productStatus = 0
fanold[ind].checked = false
this.cardlist.push(fanold[ind]);
this.fanlist.splice(ind, 1);
},
cansolfan() {
let fanglist = this.fanlist;
......@@ -402,18 +347,15 @@ export default {
this.fanlist = [];
},
feiClose(event, name) {
let feiold = this.feilist;
let indexed = this.feilist.findIndex(item => {
let feiold = this.$u.clone(this.feilist);
let ind = this.feilist.findIndex(item => {
return item.id === name;
});
let rtemlist = feiold.filter(rtem => {
if (rtem.id == name) {
rtem.productStatus = 0
return rtem;
}
});
this.feilist.splice(indexed, 1);
this.cardlist.splice(0, 0, rtemlist[0]);
feiold[ind].productStatus = 0
feiold[ind].checked = false
this.cardlist.push(feiold[ind]);
this.feilist.splice(ind, 1);
},
cansolfei() {
let feipinlist = this.feilist;
......@@ -425,197 +367,90 @@ export default {
},
// 提交
submit() {
let hegeops={};
let rangops={};
let fanxops={};
let feipops={};
let cardseops={};
let hegeops = {};
let rangops = {};
let fanxops = {};
let feipops = {};
let cardseops = {};
let lists = [];
let pass01 = this.hegelist.length>0;
let pass02 = this.ranglist.length>0;
let pass03 = this.fanlist.length>0;
let pass04 = this.feilist.length>0;
let pass05 = this.cardlist.length>0;
if(pass01){
let pass01 = this.hegelist.length > 0;
let pass02 = this.ranglist.length > 0;
let pass03 = this.fanlist.length > 0;
let pass04 = this.feilist.length > 0;
let pass05 = this.cardlist.length > 0;
if (pass01) {
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
this.hegelist.map(uh => {
hegeops.prodcutIds.push(uh.id)
})
}
if(pass02){
if (pass02) {
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [rangops];
if(pass01){
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
this.ranglist.map(ur => {
rangops.prodcutIds.push(ur.id)
})
}
if(pass03){
if (pass03) {
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [fanxops];
if(pass01){
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,fanxops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
this.fanlist.map(uf => {
fanxops.prodcutIds.push(uf.id)
})
}
if(pass05){
if (pass05) {
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [cardseops,rangops];
if(pass01){
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [cardseops,hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
this.cardlist.map(ch => {
cardseops.prodcutIds.push(ch.id)
})
}
if(pass04){
if (pass04) {
feipops = {
prodcutIds: [],
productStatus: this.feilist[0].productStatus,
cause: this.orderForm.question,
reporter: this.orderForm.useroption
};
this.feilist.map(un=>{feipops.prodcutIds.push(un.id)})
lists = [cardseops,feipops];
if(pass01){
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,feipops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops,feipops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops,feipops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
this.feilist.map(un => {
feipops.prodcutIds.push(un.id)
})
}
if (cardseops.productStatus == 0) {
lists.push(cardseops)
}
if (hegeops.productStatus) {
lists.push(hegeops)
}
if (rangops.productStatus) {
lists.push(rangops)
}
if (fanxops.productStatus) {
lists.push(fanxops)
}
console.log(lists)
let parmes={
let parmes = {
dispatchId: this.$route.query.id,
orderId: this.$route.query.orderId,
list: lists
};
Api.submitData(parmes).then(res=>{
if(res.success){
Api.submitData(parmes).then(res => {
if (res.success) {
this.$Message.success("保存成功!");
}else{
} else {
this.$Message.success("保存失败~");
}
})
......@@ -624,10 +459,10 @@ export default {
sendOrder() {
let orderse = []
let orderIds = []
this.feilist.map(item=>{
orderse.push(item.prefix+'.'+item.code)
this.feilist.map(item => {
orderse.push(item.prefix + '.' + item.code)
// orderIds.push(item.id)
orderIds.push(item.code)//工作流获取数据,暂时传code数组
orderIds.push(item.code) //工作流获取数据,暂时传code数组
})
let strOder = orderse.join(",")
this.entity.cause = this.orderForm.question;
......@@ -636,7 +471,7 @@ export default {
this.entity.orderIds = orderIds;
this.$refs["formValidate"].validate(valid => {
if (valid) {
this.submit()//提交状态改变
this.submit() //提交状态改变
let parme = {
reason: this.entity.cause,
personLiableId: this.entity.reporter,
......@@ -644,16 +479,16 @@ export default {
orderId: this.$route.query.orderId,
productIds: this.entity.orderIds,
}
Api.getshenliNo(parme).then(res=>{
if(res.success){
Api.getshenliNo(parme).then(res => {
if (res.success) {
// this.$refs.orderSendReview.info.orderInfo.code = res.result.code
this.entity.code = res.result.code
this.entity.idlist = res.result.id
}else{
} else {
console.log("获取编号失败")
}
})
let parmeseData = this.entity// this.$Message.success("送审")
let parmeseData = this.entity // this.$Message.success("送审")
console.info(parmeseData)
this.ModalOrder = true;
this.$refs.orderSendReview.alertFun(parmeseData);
......@@ -666,8 +501,8 @@ export default {
// console.log("old->",this.entity)
let orderids = []
orderids.push(this.entity.idlist)
console.log("new->",this.entity)
let parmese ={
console.log("new->", this.entity)
let parmese = {
schemaId: "c2e09c9b-02a9-4188-97a6-cdb68d50a64a",
idList: orderids,
code: this.entity.code,
......
<template>
<div>
<div class="star" v-if="dispatchStatus==12">
<div>
<div class="star" v-if="dispatchStatus == 12">
<a class="start" @click="starFun">
<Icon type="md-play" />开工
</a>
......@@ -10,12 +9,12 @@
<div class="flex fc-b">
<Button class="button" size="large" type="primary" @click="pauseFun" v-show="btnTextStatus">
<Icon type="ios-pause" />
{{btnText}}
{{ btnText }}
</Button>
<Button class="button" size="large" type="primary" @click="goPage(8,'数据填报')">
<Button class="button" size="large" type="primary" @click="goPage(8, '数据填报')">
<Icon type="logo-angular" />数据填报
</Button>
<Button class="button" size="large" type="primary" @click="goPage(7,'质量判定')">
<Button class="button" size="large" type="primary" @click="goPage(7, '质量判定')">
<Icon type="ios-checkmark-circle-outline" />质量判定
</Button>
<Button class="button" size="large" type="primary" @click="transferFn">
......@@ -24,7 +23,7 @@
</div>
<div class="star_step" v-if="false">
<div class="step_item" v-for="i of 6" :key="i">
<p class="icon_A" v-if="i>=4">
<p class="icon_A" v-if="i >= 4">
<Icon type="md-checkmark-circle" />
</p>
<p class="icon_B" v-else>
......@@ -49,57 +48,47 @@
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>产品名称:{{entity.productName}}</li>
<li>图号:{{entity.drawnNumber}}</li>
<li>产品名称:{{ entity.productName }}</li>
<li>图号:{{ entity.drawnNumber }}</li>
<li>
状态:
<state code="plan.order.status" ref="state" :value="entity.status" type="text" ></state>
<state code="plan.order.status" ref="state" :value="entity.status" type="text"></state>
</li>
<li>订单编号:{{entity.mesCode}}</li>
<li>批次号:{{entity.batchNumber}}</li>
<li>计划数量:{{entity.quantity}}</li>
<li>节点日期:{{entity.demandFinishDate}}</li>
<li>订单编号:{{ entity.mesCode }}</li>
<li>批次号:{{ entity.batchNumber }}</li>
<li>计划数量:{{ entity.quantity }}</li>
<li>节点日期:{{ entity.demandFinishDate }}</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:{{entity.seqName}}</li>
<li>工序序号:{{entity.seqNo}}</li>
<li>派工数量:{{entity.dispatchQuantity}}</li>
<li>人员信息:{{entity.userNames}}</li>
<li>准备工时:{{entity.setupTime}}</li>
<li>工序名称:{{ entity.seqName }}</li>
<li>工序序号:{{ entity.seqNo }}</li>
<li>派工数量:{{ entity.dispatchQuantity }}</li>
<li>人员信息:{{ entity.userNames }}</li>
<li>准备工时:{{ entity.setupTime }}</li>
<li>
工单状态:
<state code="taskList.status" ref="state1" :value="dispatchStatus" type="text"></state>
</li>
</ul>
</div>
<div class="img_box fl bgDDD">
<ViewerImg :images="images" />
<div class="img_box fl">
<ViewerImg :images="images" v-if="images" />
<img src="@/assets/imgicon/chan_Pin.png" width="70%" height="100%" />
</div>
</div>
<Modal v-model="ransferModal" :title="transferTitle" fullscreen style="z-index:99999" :footer-hide="cardlist.length==0">
<Modal v-model="ransferModal" :title="transferTitle" fullscreen style="z-index: 99999" :footer-hide="cardlist.length == 0">
<div class="wu_bgModal">
<div class="mass_box">
<div class="mass_list">
<h2 class="btn_play tl">
选择产品({{cardlist.length}}
选择产品({{ cardlist.length }}
<Button class="button" type="primary" @click="allcheck">全选</Button>
<Button class="button" type="primary" @click="rechecked">反选</Button>
</h2>
<div class="list01 tl">
<Tag
type="dot"
:checkable="true"
class="tag_card"
size="large"
v-for="(item,index) in cardlist"
:name="item.id"
:key="index"
:checked="item.checked"
color="primary"
@on-change="changeCards"
>{{item.product_code}}</Tag>
<Tag type="dot" :checkable="true" class="tag_card" size="large" v-for="(item, index) in cardlist" :name="item.id" :key="index" :checked="item.checked" color="primary" @on-change="changeCards">{{ item.product_code }}</Tag>
</div>
</div>
</div>
......@@ -108,61 +97,65 @@
</div>
</div>
<div slot="footer">
<Button class="button" @click="ransferModal=false">取消</Button>
<Button class="button" @click="ransferModal = false">取消</Button>
<Button class="button" type="primary" @click="ransOk">确定</Button>
</div>
</Modal>
</div>
<Modal v-model="workOrderPauseModal" title="工单暂停原因" width="800" footer-hide class="suspend">
<EntryPause @on-ok="pauseOk" ref="addBug" :info="info" />
</Modal>
</div>
</template>
<script>
import Api from "../api";
import EntryPause from "../../../order/monitoring/entryPause";
import ApiTech from "../../../technology/productMix/product/api";
export default {
name: "starOrder",
components: {
EntryPause
},
data() {
return {
starmodal: true,
downUrl: fileUrlDown,
contentMsge:
"<ul><li>暂停 2020-02-06 15:35</li><li>继续 2020-02-06 15:35</li></ul>",
contentMsge: "<ul><li>暂停 2020-02-06 15:35</li><li>继续 2020-02-06 15:35</li></ul>",
ransferModal: false,
transferTitle: "确认转序",
images: [],
iamges1: [
{
iamges1: [{
thumbnail: iconImg + "noPic_product.png",
source: iconImg + "noPic_product.png"
}
],
source: iconImg + "noPic_product.png",
}, ],
entity: {},
id: Number(this.$route.query.id),
orderId: Number(this.$route.query.orderId),
dispatchStatus: Number(this.$route.query.dispatchStatus),
eid: "",
btnText:
Number(this.$route.query.dispatchStatus) == 14
? "暂停"
: Number(this.$route.query.dispatchStatus) == 5
? "继续"
: "",
btnTextStatus:
Number(this.$route.query.dispatchStatus) == 14
? true
: Number(this.$route.query.dispatchStatus) == 5
? true
: false,
btnText: Number(this.$route.query.dispatchStatus) == 14 ?
"暂停" : Number(this.$route.query.dispatchStatus) == 5 ?
"继续" : "",
btnTextStatus: Number(this.$route.query.dispatchStatus) == 14 ?
true : Number(this.$route.query.dispatchStatus) == 5 ?
true : false,
cardlist: [],
detailId: null,
nextDetailId: null,
operatorId: null,
userlist: [],
user: null
user: null,
workOrderPauseModal: false,
info: {}
};
},
created() {
// this.treeHeight = window.innerHeight - 120;
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary");
},
mounted() {
......@@ -179,10 +172,10 @@ export default {
//开工
let params = {
id: this.id,
orderid: this.orderId + ""
orderid: this.orderId + "",
};
Api.entrystart(params)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("开工成功!");
this.dispatchStatus = 14;
......@@ -191,7 +184,7 @@ export default {
this.$Message.error("开工失败!");
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
},
......@@ -199,26 +192,27 @@ export default {
//暂停or继续
let params = {
id: this.id,
orderid: this.orderId + ""
orderid: this.orderId + "",
};
if (this.btnText == "暂停") {
Api.entrypause(params)
.then(res => {
if (res.success) {
this.$Message.success("暂停成功!");
this.dispatchStatus = 5;
this.btnText = "继续";
this.textBtn();
} else {
this.$Message.error("暂停失败!");
}
})
.catch(err => {
this.$Message.error("连接错误");
});
this.pause();
// Api.entrypause(params)
// .then((res) => {
// if (res.success) {
// this.$Message.success("暂停成功!");
// this.dispatchStatus = 5;
// this.btnText = "继续";
// this.textBtn();
// } else {
// this.$Message.error("暂停失败!");
// }
// })
// .catch((err) => {
// this.$Message.error("连接错误");
// });
} else if (this.btnText == "继续") {
Api.entrentrycontinuestart(params)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("继续成功!");
this.dispatchStatus = 14;
......@@ -228,11 +222,26 @@ export default {
this.$Message.error("继续失败!");
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
}
},
pause() {
//暂停工单
this.info = {
dispatch_id: this.id,
execute_id: Number(this.$route.query.executeId),
order_id: this.orderId
};
this.workOrderPauseModal = true;
},
pauseOk() {
this.workOrderPauseModal = false;
this.dispatchStatus = 5;
this.btnText = "继续";
this.textBtn();
},
textBtn() {
//控制第一个按钮的text及显示
if (this.dispatchStatus == 14) {
......@@ -253,14 +262,16 @@ export default {
load(v) {
//加载基础数据
let params = {
id: v
id: v,
};
Api.orderanddispatchinfos(params)
.then(r => {
.then((r) => {
if (r.success && r.result) {
this.entity = r.result;
if (r.result.productId && r.result.productId > 0) {
ApiTech.get({ id: r.result.productId }).then(res => {
ApiTech.get({
id: r.result.productId
}).then((res) => {
if (res.success && res.result) {
if (
res.result.productUrlList &&
......@@ -275,14 +286,14 @@ export default {
app: "technology",
eid: this.eid,
name: "",
field: ""
field: "",
};
this.$http.sysUser
.getFile(parms)
.then(res1 => {
.then((res1) => {
if (res1.data != [] && res1.data.length > 0) {
this.images.splice(0);
res1.data.forEach(datas => {
res1.data.forEach((datas) => {
let objImag = {};
objImag.thumbnail = this.downUrl + datas.downloadPath;
objImag.source = this.downUrl + datas.downloadPath;
......@@ -292,7 +303,7 @@ export default {
this.images = this.iamges1;
}
})
.catch(err => {
.catch((err) => {
this.images = this.iamges1;
});
}
......@@ -300,7 +311,7 @@ export default {
}
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
},
......@@ -318,43 +329,43 @@ export default {
let pid = Number(this.$route.query.id); // JSON.stringify()
let params = {
id: Number(this.$route.query.id),
executeId: Number(this.$route.query.executeId)
executeId: Number(this.$route.query.executeId),
};
Api.productsandoperators(params)
.then(res => {
.then((res) => {
if (res.success && res.result) {
this.detailId = res.result.detailId;
this.nextDetailId = res.result.nextDetailId;
let users = res.result.users;
this.userlist = [];
users.forEach(u => {
users.forEach((u) => {
(u.value = u.id), (u.label = u.userName);
this.userlist.push(u);
});
let resoult = res.result.products;
resoult.filter(u => {
resoult.filter((u) => {
u.checked = false;
this.cardlist.push(u);
});
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
},
// 全选
allcheck() {
let cardslist = this.cardlist;
cardslist.map(a => {
cardslist.map((a) => {
a.checked = true;
});
},
// 反选
rechecked() {
let cardslist = this.cardlist;
cardslist.map(b => {
cardslist.map((b) => {
b.checked = !b.checked;
});
},
......@@ -391,23 +402,22 @@ export default {
nextDetailId: this.nextDetailId,
productIds: upList,
operatorId: userInfo[0].id,
operator: userInfo[0].userName
operator: userInfo[0].userName,
};
Api.confirmproductsandoperator(params)
.then(res => {
.then((res) => {
if (res.success && res.result) {
this.$Message.success("转续成功");
this.ransferModal=false
}
else{
this.ransferModal = false;
} else {
this.$Message.error("转续失败");
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
}
},
},
watch: {
"$route.query.id"(v1) {
......@@ -433,7 +443,7 @@ export default {
},
images(v) {
this.images = v;
}
}
},
},
};
</script>
......@@ -2,7 +2,7 @@
@import "../processDesign/Process/menu.less";
</style>
<template>
<div class="new_box">
<div class="new_box">
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline>
<!-- <Row>
<FormItem label="文件模板" prop="file_template">
......@@ -27,13 +27,7 @@
<Row>
<Col span="10">
<FormItem label="文档编号" prop="code">
<Input
size="large"
v-model.trim="formValidate.code"
placeholder="请输入..."
style="width:240px"
:disabled="codeisview"
/>
<Input size="large" v-model.trim="formValidate.code" placeholder="请输入..." style="width:240px" :disabled="codeisview" />
</FormItem>
</Col>
<Col span="10">
......@@ -49,11 +43,7 @@
<Table stripe ref="table" border :columns="column1" :data="formValidate1" class="tableCommon">
<template slot-scope="{ row,index }" slot="materialType">
<state
code="mes_xingchi_resource.material.materialReType"
type="text"
:value="row.material_type"
></state>
<state code="mes_xingchi_resource.material.materialReType" type="text" :value="row.material_type"></state>
</template>
</Table>
<Modal v-model="newModel" title="查看物料项" :mask-closable="false" width="830px">
......@@ -77,11 +67,7 @@
<Col :span="12">
<FormItem :label="l('materialType')" prop="materialType">
<Dictionary
:disabled="true"
code="mes_xingchi_resource.material.materialReType"
v-model="formprocessValidate.material_type"
></Dictionary>
<Dictionary :disabled="true" code="mes_xingchi_resource.material.materialReType" v-model="formprocessValidate.material_type"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
......@@ -117,8 +103,9 @@
</Row>
</Form>
</Modal>
</div>
</div>
</template>
<script>
import service from "@/plugins/request";
......@@ -140,9 +127,11 @@ export default {
editindex: -1,
ruleValidate: {
materialPlanFinishDate: [
{ required: true, message: "配套完成时间不能为空", trigger: "blur" }
]
materialPlanFinishDate: [{
required: true,
message: "配套完成时间不能为空",
trigger: "blur"
}]
// name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' }
......@@ -226,8 +215,12 @@ export default {
procurementStandards: "",
qualityGrade: ""
},
column1: [
{ title: "序号", type: "index", width: "70", align: "center" },
column1: [{
title: "序号",
type: "index",
width: "70",
align: "center"
},
{
key: "materialNumber",
title: this.l("materialNumber"),
......@@ -329,14 +322,17 @@ export default {
let id = params.row.id;
return h(
"div",
{
"div", {
class: "icon_box"
},
[
h("op", {
class: "view ",
attrs: { icon: "ios-eye", title: "查看", type: "icon" },
attrs: {
icon: "ios-eye",
title: "查看",
type: "icon"
},
on: {
click: () => {
this.editFun(params);
......@@ -352,7 +348,7 @@ export default {
},
mounted() {},
created: function() {},
created: function () {},
methods: {
handleCreate1(val) {
this.EquipList.push({
......@@ -372,7 +368,7 @@ export default {
this.newModel = true;
},
loaddata(orderid) {
var url = `${designUrl}/ordermateriallist/getbyorderid?id=` + orderid;
var url = `${technologyUrl}ordermateriallist/getbyorderid?id=` + orderid;
service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial;
......@@ -394,7 +390,7 @@ export default {
orderMaterialList: this.formValidate1,
finishDate: this.formValidate.materialPlanFinishDate
};
let url = `${designUrl}/ordersupport/updateordermaterialactualquantity`;
let url = `${technologyUrl}/ordersupport/updateordermaterialactualquantity`;
service.put(`${url}`, parmes).then(res => {
if (res.success) {
this.$Message.success("操作成功");
......
<template>
<div class="aps-r">
<DataGrid :columns="columns" ref="grid" :batch="false" :type="typeInfo" :span="6" :lazy="true" :conditions="easySearch" :action="action" :gutter="40">
<div class="aps-r">
<DataGrid
:columns="columns"
ref="grid"
:batch="false"
:type="typeInfo"
:span="6"
:lazy="true"
:conditions="easySearch"
:action="action"
:gutter="40"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入订单编号/产品名称/图号" v-model="easySearch.keys.value" v-width="260" clearable />
<Input
placeholder="请输入订单编号/产品名称/图号"
v-model="easySearch.keys.value"
v-width="260"
clearable
/>
</FormItem>
<!--
<FormItem>
......@@ -20,10 +35,31 @@
<Search />
</template>
<template slot="buttons">
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
<Button
:icon="iconInfo"
shape="circle"
:title="titleInfo"
@click="changeShwo"
></Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" @click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status,row.mesCode,row.productName,row.drawnNumber)">
<template slot="card" slot-scope="{ row }">
<div
class="body"
@click="
toExecute(
row.id,
row.orderId,
row.executeId,
row.routingHeaderId,
row.routingDetailId,
row.quantity,
row.status,
row.mesCode,
row.productName,
row.drawnNumber
)
"
>
<Row class="title-i">
<Col :span="10" class="order-code">
<Ellipsis :text="row.productName" :lines="1" tooltip transfer />
......@@ -35,7 +71,13 @@
<div class="statuBg" :style="tdStyle(row.status)"></div>
<div class="boxTitle">
<div class="text">
<state code="taskList.status" ref="state" :value="row.status" type="text" :color="false"></state>
<state
code="taskList.status"
ref="state"
:value="row.status"
type="text"
:color="false"
></state>
</div>
</div>
</Col>
......@@ -44,8 +86,13 @@
<Row>
<Col span="8">
<div class="img-i">
<img :src="downUrl +row.productUrl" v-if="row.productUrl" />
<img src="@/assets/imgicon/chan_Pin.png" v-else width="100%" height="100%" />
<img :src="downUrl + row.productUrl" v-if="row.productUrl" />
<img
src="@/assets/imgicon/chan_Pin.png"
v-else
width="100%"
height="100%"
/>
</div>
<!-- <img
:src="getUrl(row.productUrl)"
......@@ -57,33 +104,73 @@
/>-->
</Col>
<Col span="16" class="row">
<p>{{l("beginTime")}}{{row.beginTime}}</p>
<p>{{ l("beginTime") }}{{ row.beginTime }}</p>
<p>
<span v-if="getStatus(row.status)">{{l("planEndTime")}}</span>
<span v-else>{{l("endTime")}}</span>
{{row.endTime}}
<span v-if="getStatus(row.status)"
>{{ l("planEndTime") }}</span
>
<span v-else>{{ l("endTime") }}</span>
{{ row.endTime }}
</p>
<p v-if="getStatus(row.status)&&getTimes(row.endTime)>0">
<p v-if="getStatus(row.status) && getTimes(row.endTime) > 0">
剩余时间:
<OutputTime :value="getTimes(row.endTime)" style="display:inline"></OutputTime>
<OutputTime
:value="getTimes(row.endTime)"
style="display: inline"
></OutputTime>
</p>
<p>{{l("quantity")}}{{row.quantity}}</p>
<Row>
<Col span="12">
<p>{{ l("quantity") }}{{ row.quantity }}</p></Col
>
<Col span="12"
><p>工序号:{{ row.taskSeq }}</p></Col
>
</Row>
<p>工序名称:{{ row.taskName }}</p>
</Col>
</Row>
<Row class="rowBottom">
<Col span="14">{{l("drawnNumber")}}{{row.drawnNumber}}</Col>
<Col span="14">{{ l("drawnNumber") }}{{ row.drawnNumber }}</Col>
<Col span="10" class="tr">
<Icon type="md-alert" size="18" color="#FFA000" v-if="getStatus(row.status)&&getTimes(row.endTime)<86400&&getTimes(row.endTime)>0" />
<span style="color:#FFA000" v-if="getStatus(row.status)&&getTimes(row.endTime)<86400&&getTimes(row.endTime)>0">预警</span>&nbsp;&nbsp;
<Icon type="md-timer" size="18" color="#FE7777" v-if="getStatus(row.status)&&compareTime(row.endTime)" />
<span style="color:#FE7777" v-if="getStatus(row.status)&&compareTime(row.endTime)">超期</span>
<Icon
type="md-alert"
size="18"
color="#FFA000"
v-if="
getStatus(row.status) &&
getTimes(row.endTime) < 86400 &&
getTimes(row.endTime) > 0
"
/>
<span
style="color: #ffa000"
v-if="
getStatus(row.status) &&
getTimes(row.endTime) < 86400 &&
getTimes(row.endTime) > 0
"
>预警</span
>&nbsp;&nbsp;
<Icon
type="md-timer"
size="18"
color="#FE7777"
v-if="getStatus(row.status) && compareTime(row.endTime)"
/>
<span
style="color: #fe7777"
v-if="getStatus(row.status) && compareTime(row.endTime)"
>超期</span
>
</Col>
</Row>
</div>
</div>
</template>
</DataGrid>
</div>
</div>
</template>
<script>
......@@ -104,11 +191,12 @@ export default {
},
DispatchStatus: {
op: "In",
value: [12, 14, 5, 7, -1]
}
value: [12, 14, 5, 7, -1],
},
},
downUrl: fileUrlDown,
columns: [{
columns: [
{
title: this.l("Id"),
key: "id",
width: 80,
......@@ -168,12 +256,14 @@ export default {
align: "center",
render: (h, params) => {
return h(
"div", {
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "edit",
},
......@@ -210,10 +300,7 @@ export default {
let oldStr = localStorage.getItem("admin");
let userlist = this.$store.getters.getUser(2);
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
......
......@@ -540,7 +540,7 @@ export default {
},
//新增保存或修改保存
save() {
this.cur.groupId = this.eid;
this.cur.projectId = this.eid;
if (this.cur.userId === undefined) {
this.$Message.error("请选择人员");
return;
......
......@@ -8,7 +8,7 @@
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''" >
<Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true">
<template slot="easySearch">
<Form ref="formInline" inline>
......@@ -175,6 +175,8 @@ export default {
return h('DateRange', {
props: {
value: params.row,
start: 'plansToStartDate',
end: 'plansToEndTime',
}
})
}
......
<template>
<div class="end-issued">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight"></DataGrid>
<Modal v-model="detailModal" title="查看合格证" @on-cancel="reload" footer-hide width="1000" :mask-closable="false">
<div class="end-issued">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:high="false"
:height="tdHeight"
></DataGrid>
<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>
</div>
</template>
<script>
......@@ -13,7 +27,7 @@ import Detail from "./detail";
export default {
name: "index",
components: {
Detail
Detail,
},
data() {
return {
......@@ -23,17 +37,20 @@ export default {
modalInfo: false,
tdHeight: "",
rules: {
approveUser: [{
approveUser: [
{
required: true,
message: "必填",
trigger: "blur"
}]
trigger: "blur",
},
],
},
columns: [{
columns: [
{
key: "id",
title: this.l("id"),
hide: true,
align: "left"
align: "left",
},
// {
// type: 'selection',
......@@ -45,28 +62,28 @@ export default {
title: this.l("mesCode"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "productName",
title: this.l("productName"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "drawnNumber",
title: this.l("drawnNumber"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
easy: true,
high: true
high: true,
},
{
......@@ -74,14 +91,14 @@ export default {
title: this.l("qualifiedQuantity"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "uncertificateQuantity",
title: this.l("uncertificateQuantity"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "actualFinishDate",
......@@ -92,61 +109,66 @@ export default {
render: (h, params) => {
return h(
"span",
params.row.actualFinishDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualFinishDate
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
);
}
},
},
{
key: "productingPreparationPeople",
title: this.l("productingPreparationPeople"),
align: "left",
easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: "plan.order.status"
},
// {
// key: "status",
// title: this.l("status"),
// align: "left",
// easy: true,
// high: true,
// code: "plan.order.status"
// },
{
title: "操作",
key: "action",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "detail",
title: "查看合格证"
title: "查看合格证",
},
on: {
click: () => this.detail(params.row.id)
}
click: () => this.detail(params.row.id),
},
},
"查看合格证"
)
]);
}
}
),
]
);
},
},
],
easySearch: {
keys: {
op: "mesCode",
value: "",
default: true
default: true,
},
type: {
op: "Equal",
value: 2
}
}
value: 2,
},
},
};
},
mounted() {},
......@@ -177,8 +199,8 @@ export default {
l(key) {
let vkey = "waitOpened" + "." + key;
return this.$t(vkey) || key;
}
}
},
},
};
</script>
......
<template>
<div class="pdf-detail">
<div class="pdf-out">
<Button type="primary" @click="$u.outPdf('.cerioficate-pdf-detail','合格证')">导出</Button>
<Button
type="primary"
@click="$u.outPdf('.cerioficate-pdf-detail', '合格证')"
>导出</Button
>
</div>
<div class="cerioficate-pdf-detail">
<!-- <div class="pdf-img">
<img src="@/assets/images/log_pdf.png" alt="图片未加载" />
</div> -->
<div class="pdf-title">产品合格证</div>
<div class="bian-hao">产品合格证编号:{{results.serialNumber}}</div>
<div class="bian-hao">产品合格证编号:{{ results.serialNumber }}</div>
<div class="body-d body-table">
<Row class="row-border right-border">
<Col :span="4" class="col-border">用户单位</Col>
<Col :span="20" class="col-border">{{results.userUnit}}</Col>
<Col :span="20" class="col-border">{{ results.userUnit }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">任务依据</Col>
<Col :span="20" class="col-border">{{results.taskBased}}</Col>
<Col :span="20" class="col-border">{{ results.taskBased }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{results.productName}}</Col>
<Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col>
<Col :span="8" class="col-border">{{ results.productName }}</Col>
<!-- <Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">
<state code="plan.order.status" :value="results.productStatus"
/></Col> -->
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品编号</Col>
<Col :span="8" class="col-border">{{results.productSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.productSerialNumber
}}</Col>
<Col :span="4" class="col-border">原材料批号</Col>
<Col :span="8" class="col-border">{{results.materialSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialSerialNumber
}}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料编号</Col>
<Col :span="8" class="col-border">{{results.materialCode}}</Col>
<Col :span="8" class="col-border">{{ results.materialCode }}</Col>
<Col :span="4" class="col-border">产品代号(图号)</Col>
<Col :span="8" class="col-border">{{results.productCode}}</Col>
<Col :span="8" class="col-border">{{ results.productCode }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料合格证编号</Col>
<Col :span="8" class="col-border">{{results.materialCertificationNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialCertificationNumber
}}</Col>
<Col :span="4" class="col-border">数量</Col>
<Col :span="8" class="col-border">{{results.productQuantity}}</Col>
<Col :span="8" class="col-border">{{ results.productQuantity }}</Col>
</Row>
<!-- <Row class="row-border right-border">
<Col :span="4" class="col-border">增材制造批次号</Col>
......@@ -57,66 +69,82 @@
<Col :span="5" class="col-border">结论</Col>
<Col :span="5" class="col-border">备注</Col>
</Row>
<Row class="row-border right-border" v-for="(item,index) in results.items" :key="index">
<Col :span="1" class="col-border">{{index+1}}</Col>
<Col :span="5" class="col-border">{{item.name}}</Col>
<Col :span="5" class="col-border">{{item.require}}</Col>
<Col :span="3" class="col-border">{{item.result}}</Col>
<Col :span="5" class="col-border">{{item.conclusion}}</Col>
<Col :span="5" class="col-border">{{item.remark}}</Col>
<Row
class="row-border right-border"
v-for="(item, index) in results.items"
:key="index"
>
<Col :span="1" class="col-border">{{ index + 1 }}</Col>
<Col :span="5" class="col-border">{{ item.name }}</Col>
<Col :span="5" class="col-border">{{ item.require }}</Col>
<Col :span="3" class="col-border">{{ item.result }}</Col>
<Col :span="5" class="col-border">{{ item.conclusion }}</Col>
<Col :span="5" class="col-border">{{ item.remark }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">结论</Col>
<Col :span="20" class="col-border">{{results.conclusion}}</Col>
<Col :span="20" class="col-border">{{ results.conclusion }}</Col>
</Row>
<Row class="row-border right-border bottom-border">
<Col :span="4" class="col-border">检验员 / 时间</Col>
<Col :span="8" class="col-border">{{results.examUser}} {{results.examDate}}</Col>
<Col :span="8" class="col-border">
<User :value="parseInt(results.examUser)" />&nbsp;
{{ results.examDate }}</Col
>
<Col :span="4" class="col-border">批准人 / 时间</Col>
<Col :span="8" class="col-border">{{results.approveUser}} {{results.approveDate}}</Col>
<Col :span="8" class="col-border"
><User :value="parseInt(results.approveUser)" />&nbsp;
{{ results.approveDate }}</Col
>
</Row>
</div>
<div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div>
<Row style="margin-top:5px;">
<div style="margin-top: 20px">
本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)
</div>
<Row style="margin-top: 5px">
<Col :span="10">地址:</Col>
<Col :span="8" >电话:</Col>
<Col :span="6" >邮编:</Col>
<Col :span="8">电话:</Col>
<Col :span="6">邮编:</Col>
</Row>
</div>
</div>
</template>
<script>
import Api from '../../certificate/api'
import Api from "../../certificate/api";
export default {
name: '',
name: "",
props: {
eid: Number
eid: Number,
},
data() {
return {
results: []
}
results: [],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
// this.loadss()
},
methods: {
load(v) {
Api.getCertificate({ id: v }).then((r) => {
this.results = r.result
console.log(r.result)
})
}
this.results = r.result;
console.log(r.result);
});
},
},
watch: {
eid(v) {
if (v != null) {
this.load(v)
this.load(v);
}
}
}
}
},
},
};
</script>
<style lang="less" scoped>
......
......@@ -14,8 +14,10 @@
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{ results.productName }}</Col>
<Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{ results.productStatus }}</Col>
<!-- <Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">
<state code="plan.order.status" :value="results.productStatus"
/></Col> -->
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品编号</Col>
......@@ -75,11 +77,13 @@
<Row class="row-border right-border bottom-border">
<Col :span="4" class="col-border">检验员 / 时间</Col>
<Col :span="8" class="col-border"
>{{ results.examUser }} {{ results.examDate }}</Col
><User :value="parseInt(results.examUser)" />&nbsp;
{{ results.examDate }}</Col
>
<Col :span="4" class="col-border">批准人 / 时间</Col>
<Col :span="8" class="col-border"
>{{ results.approveUser }} {{ results.approveDate }}</Col
><User :value="parseInt(results.approveUser)" />&nbsp;
{{ results.approveDate }}</Col
>
</Row>
</div>
......@@ -105,6 +109,10 @@ export default {
data() {
return {};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
l(key) {
key = "waitOpened" + "." + key;
......
......@@ -35,7 +35,7 @@
/>
</FormItem>
</Col>
<Col :span="6">
<!-- <Col :span="6">
<FormItem :label="l('productStatus')" prop="productStatus">
<Dictionary
disabled
......@@ -46,7 +46,7 @@
:key="entity.productStatus"
></Dictionary>
</FormItem>
</Col>
</Col> -->
<Col :span="6">
<FormItem :label="l('materialCode')" prop="materialCode">
<Input v-model="entity.materialCode"></Input>
......@@ -154,7 +154,7 @@
</Col>
<Col :span="6">
<FormItem :label="l('examUser')" prop="examUser">
<UserSelect ref="examUser" v-model="entity.examUser" />
<UserSelect ref="examUser" v-model="entity.examUser" :roleTitle='roleTitle'/>
</FormItem>
</Col>
<!-- <Col :span="6">
......@@ -196,6 +196,7 @@ export default {
data() {
return {
isId: "",
roleTitle:"检验",
examineModal: false,
submit: true,
isDisabled: false,
......@@ -213,6 +214,7 @@ export default {
id: 0,
status: 0,
items: [],
userUnit:''
},
rules: {
// userUnit: [{ required: true, message: "必填", trigger: "change" }],
......
......@@ -94,14 +94,14 @@ export default {
easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: "plan.order.status"
},
// {
// key: "status",
// title: this.l("status"),
// align: "left",
// easy: true,
// high: true,
// code: "plan.order.status"
// },
{
title: "操作",
key: "action",
......
import Api from '@/plugins/request'
export default {
index:`${resourceUrl}/materialpowder/itempaged`,
index:`${material}/material/paged`,
paged(params){
return Api.post(`${resourceUrl}/materialpowder/itempaged`,params);
return Api.post(`${material}/material/paged`,params);
},
get(params){
return Api.get(`${resourceUrl}/materialpowder/get`,params);
return Api.get(`${material}/materialpowder/get`,params);
},
create(params){
return Api.post(`${resourceUrl}/materialpowder/create`,params);
return Api.post(`${material}/materialpowder/create`,params);
},
update(params){
return Api.post(`${resourceUrl}/materialpowder/update`,params);
return Api.post(`${material}/materialpowder/update`,params);
},
//删除:
delete(params) {
return Api.delete(`${resourceUrl}/materialpowder/delete`,{params:params});
return Api.delete(`${material}/materialpowder/delete`,{params:params});
},
}
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :high='false' :action="action" :conditions="easySearch"></DataGrid>
<DataGrid
:columns="columns"
ref="grid"
:high="false"
:action="action"
:conditions="easySearch"
></DataGrid>
</div>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
// name: 'list',
// components:{
......@@ -18,145 +24,157 @@ export default {
detailModal: false,
deletelModal: false,
easySearch: {
keys: { op: 'brand,name', value: '',default:true },
reinspectionStatus: { op: 'Equal', value: 3 }
keys: { op: "brand,name", value: "", default: true },
reinspectionStatus: { op: "Equal", value: 1 },
},
curId: 0,
columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
key: 'brand',
title: this.l('brand'),
align: 'left',
easy: true,
high: true
},
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: 'name',
title: this.l('name'),
align: 'left',
easy: true,
high: true
},
key: "codeRuleType",
title: "类型",
align: "center",
code: "material.code.type",
import: true,
hide: true,
},
// {
// key: "codeRuleId",
// title: "编码名称",
// materialKey: "3",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType3(params.row.codeRuleId));
// },
// },
// {
// key: "rootCategoryId",
// title: "大类",
// align: "right",
// materialKey: "1",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType1(params.row.rootCategoryId));
// },
// },
// {
// key: "categoryId",
// title: "子类",
// align: "right",
// materialKey: "2",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType2(params.row.categoryId));
// },
// },
{
key: 'specifications',
title: this.l('specifications'),
align: 'left',
easy: true,
high: true
},
key: "code",
title: "编码",
align: "left",
render: (h, params) => {
return h(
"div",
{
key: 'batchNo',
title: this.l('batchNo'),
align: 'left',
easy: true,
high: true,
hide:true,
props: {},
on: {
click: () => this.details(params.row),
},
{
key: 'originalManufacturer',
title: this.l('originalManufacturer'),
align: 'left',
easy: true,
high: true,
hide:true,
},
{
key: 'reinspectionDate',
title: this.l('reinspectionDate'),
align: 'left',
render: (h, paras) => {
return h('span', paras.row.reinspectionDate)
!params.row.code || params.row.code == 0
? "未分配"
: params.row.code
);
},
high: true,
width:180,
},
{
key: 'remainingAmount',
title: this.l('remainingAmount'),
align: 'left',
high: true
key: "name",
title: "名称",
align: "left",
},
{
key: 'storeId',
title: this.l('storeId'),
align: 'left',
render: (h, paras) => {
return h('span', paras.row.storeId)
key: "status",
title: "状态",
align: "center",
code: "material.main.status",
},
high: true
{
key: "version",
title: "版本",
align: "left",
code: "material.main.version",
},
{
key: 'location',
title: this.l('location'),
align: 'left',
easy: true,
high: true
key: "drawing",
title: "图号",
align: "left",
},
{
key: 'category',
title: this.l('category'),
align: 'center',
high: true,
code: 'mes_xingchi_resource.material.powderType'
key: "creationTime",
title: "创建时间",
hide: true,
align: "left",
type: "date",
},
{
key: 'reinspectionStatus',
title: this.l('reinspectionStatus'),
align: 'center',
code: 'mes_xingchi_resource.material.recheckState',
easy: true,
high: true
key: "creatorUserId",
title: "创建人",
hide: true,
align: "left",
type: "user",
},
// render:(h,paras)=>{return h('span',paras.row.reinspectionStatus)} ,
{
title: '操作',
key: 'id',
title: "操作",
key: "id",
width: 150,
align: 'center',
align: "center",
render: (h, params) => {
// let herfurl = params.row.certificateUploadPath;
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs:{
oprate:'detail'
} ,
class: 'view',
on: { click: () => {
this.detail(params.row)
} }
attrs: {
oprate: "detail",
},
class: "view",
on: {
click: () => {
this.detail(params.row);
},
},
'查看复验单'
)
])
}
}
]
}
},
mounted() {
"查看复验单"
),
]);
},
},
],
};
},
mounted() {},
methods: {
reload(){
this.$refs.grid.load()
reload() {
this.$refs.grid.load();
},
detail(row) {
let ssdata = row.certificateUploadPath
if(this.$u.isNull(ssdata)){
this.$Message.warning('复验单为空!')
}else{
var item=JSON.parse(ssdata)[0]["filePath"],
let ssdata = row.certificateUploadPath;
if (this.$u.isNull(ssdata)) {
this.$Message.warning("复验单为空!");
} else {
var item = JSON.parse(ssdata)[0]["filePath"],
url = fileUrlDown + item;
window.open(url)
window.open(url);
// this.$Message.warning('文件格式不支持')
}
},
removeCancel() {
this.deletelModal = false
this.deletelModal = false;
},
l(key) {
/*
......@@ -186,11 +204,11 @@ export default {
lastModifierUserId:'',
}
*/
let vkey = 'waitReview' + '.' + key
return this.$t(vkey) || key
}
}
}
let vkey = "waitReview" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :high='false' :action="action" :conditions="easySearch">
<DataGrid
:columns="columns"
ref="grid"
:high="false"
:action="action"
:conditions="easySearch"
>
<!-- <template slot="searchForm">
<!-- <Search />
</template>-->
......@@ -9,18 +15,25 @@
</template>-->
</DataGrid>
<Modal v-model="detailModal" title="复验" width="490" footer-hide>
<Form :model="setNumForm" :label-width="90" :rules="rules" >
<Form :model="setNumForm" :label-width="90" :rules="rules">
<Row>
<Col span="24">
<FormItem label="合格证编码">
<Input v-model="setNumForm.substrateCoding" placeholder="系统自动生成可修改"></Input>
<Input
v-model="setNumForm.substrateCoding"
placeholder="系统自动生成可修改"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col span="24">
<FormItem label="复验文件" prop="storeTitle">
<inputFile v-model="setNumForm.imgName" :parms="qcfileparms" files />
<inputFile
v-model="setNumForm.imgName"
:parms="qcfileparms"
files
/>
</FormItem>
</Col>
</Row>
......@@ -42,10 +55,10 @@
</div>
</template>
<script>
import Api from '../api'
import service from '@/plugins/request'
import Api from "../api";
import service from "@/plugins/request";
export default {
name: 'list',
name: "list",
// components:{
// Add,Edit,Detail,Search
// },
......@@ -56,170 +69,188 @@ export default {
editModal: false,
detailModal: false,
deletelModal: false,
redmsg:false,
redmsg: false,
rules: {
storeTitle: [
{ required: true, message: '请选择库位', trigger: 'blur' }
{ required: true, message: "请选择库位", trigger: "blur" },
],
},
qcfileparms: 'app=qms&eid=' + this.curId + '&name=ProcessRecord', //模块+单条数据id+文件字段名
qcfileparms: "app=qms&eid=" + this.curId + "&name=ProcessRecord", //模块+单条数据id+文件字段名
setNumForm: {
substrateCoding: '',
substrateCoding: "",
id: 0,
imgName: ''
imgName: "",
},
easySearch: {
keys: { op: 'brand,name', value: '',default:true},
reinspectionStatus: { op: 'Equal', value: 1 }
keys: { op: "brand,name", value: "", default: true },
reinspectionStatus: { op: "Equal", value: 0 },
status: { op: "Equal", value: 3 },
},
columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' },
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: 'brand',
title: this.l('brand'),
align: 'left',
easy: true,
high: true
},{
key: 'name',
title: this.l('name'),
align: 'left',
easy: true,
high: true
},{
key: 'specifications',
title: this.l('specifications'),
align: 'left',
easy: true,
high: true
},{
key: 'batchNo',
title: this.l('batchNo'),
align: 'left',
easy: true,
high: true,
hide:true,
},{
key: 'originalManufacturer',
title: this.l('originalManufacturer'),
align: 'left',
easy: true,
high: true,
hide:true,
key: "codeRuleType",
title: "类别",
align: "center",
code: "material.code.type",
import: true,
hide: true,
},
// {
// key: 'reinspectionDate',
// title: this.l('reinspectionDate'),
// align: 'center',
// render: (h, paras) => {
// return h('span', paras.row.reinspectionDate)
// key: "codeRuleId",
// title: "编码名称",
// materialKey: "3",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType3(params.row.codeRuleId));
// },
// high: true,
// width:180,
// },
// {
// key: "rootCategoryId",
// title: "大类",
// align: "right",
// materialKey: "1",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType1(params.row.rootCategoryId));
// },
// },
// {
// key: "categoryId",
// title: "子类",
// align: "right",
// materialKey: "2",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType2(params.row.categoryId));
// },
// },
{
key: "code",
title: "编码",
align: "left",
render: (h, params) => {
return h(
"div",
{
props: {},
on: {
click: () => this.details(params.row),
},
},
!params.row.code || params.row.code == 0
? "未分配"
: params.row.code
);
},
},
{
key: "name",
title: "名称",
align: "left",
},
{
key: 'remainingAmount',
title: this.l('remainingAmount'),
align: 'left',
high: true
},{
key: 'storeId',
title: this.l('storeId'),
align: 'left',
render: (h, paras) => {
return h('span', paras.row.storeId)
},
high: true
},{
key: 'location',
title: this.l('location'),
align: 'left',
easy: true,
high: true
},{
key: 'category',
title: this.l('category'),
align: 'center',
high: true,
code: 'mes_xingchi_resource.material.powderType'
},{
key: 'reinspectionStatus',
title: this.l('reinspectionStatus'),
code: 'mes_xingchi_resource.material.recheckState',
align: 'center',
easy: true,
high: true,
width:100
key: "status",
title: "状态",
align: "center",
code: "material.main.status",
},
{
title: '操作',
key: 'id',
key: "version",
title: "版本",
align: "left",
code: "material.main.version",
},
{
key: "drawing",
title: "图号",
align: "left",
},
{
key: "creationTime",
title: "创建时间",
hide: true,
align: "left",
type: "date",
},
{
key: "creatorUserId",
title: "创建人",
hide: true,
align: "left",
type: "user",
},
{
title: "操作",
key: "id",
width: 100,
align: 'center',
align: "center",
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs:{
oprate:'detail'
} ,
on: { click: () => this.detail(params.row.id) }
},
'复验'
)
])
}
}
]
}
attrs: {
oprate: "detail",
},
on: { click: () => this.detail(params.row.id) },
},
"复验"
),
]);
},
mounted() {
},
],
};
},
mounted() {},
methods: {
detail(id) {
this.detailModal = true
this.detailModal = true;
this.setNumForm = {
substrateCoding: '',
substrateCoding: "",
id: id,
imgName: ''
}
imgName: "",
};
// this.setNumForm.id = id;
},
suerUp() {
if(this.setNumForm.imgName == ''||this.setNumForm.imgName == null){
if (this.setNumForm.imgName == "" || this.setNumForm.imgName == null) {
this.detailModal = true;
this.redmsg = true;
}else{
} else {
this.redmsg = false;
let url = `${resourceUrl}/materialpowder/exam`,
let url = `${material}/material/exam`,
parmse = {
"id": this.setNumForm.id,
"certificateNumber": this.setNumForm.substrateCoding,
"certificateUploadPath": this.setNumForm.imgName,
id: this.setNumForm.id,
certificateNumber: this.setNumForm.substrateCoding,
certificateUploadPath: this.setNumForm.imgName,
};
service.post(`${url}`,parmse).then((res) => {
if(res.success){
this.$Message.success('订单已复验。')
service.post(`${url}`, parmse).then((res) => {
if (res.success) {
this.$Message.success("订单已复验。");
this.detailModal = false;
this.$refs.grid.load()
}else{
this.$Message.warning('请重新复验!')
this.$refs.grid.load();
} else {
this.$Message.warning("请重新复验!");
}
})
});
}
},
handleClose() {
this.detailModal = false
this.detailModal = false;
},
// 列表title
l(key) {
let vkey = 'waitReview' + '.' + key
return this.$t(vkey) || key
}
}
}
let vkey = "waitReview" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<div class="resources-p h100">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:high="false"
@on-selection-change="onSelect"
>
<div class="resources-p h100">
<DataGrid :columns="columns" ref="grid" :action="action" :high="false" @on-selection-change="onSelect">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -43,15 +37,16 @@
</template>
</DataGrid>
<Modal v-model="editModal" title="设置日历" footer-hide>
<Modal v-model="editModal" title="设置日历" footer-hide width="1000">
<Set :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
......@@ -66,7 +61,10 @@ export default {
return {
action: Api.index,
easySearch: {
keys: { op: "title,code,type,departTitle", value: null },
keys: {
op: "title,code,type,departTitle",
value: null
},
},
entity: {
isimportant: "1",
......@@ -77,11 +75,23 @@ export default {
deletelModal: false,
curId: 0,
rules: {
isimportant: [{ required: true, message: "必填", trigger: "blur" }],
capabilityValue: [{ required: true, message: "必填", trigger: "blur" }],
isimportant: [{
required: true,
message: "必填",
trigger: "blur"
}],
capabilityValue: [{
required: true,
message: "必填",
trigger: "blur"
}],
},
columns: [{
key: "id",
title: this.l("id"),
hide: true,
align: "left"
},
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
type: "selection",
width: 70,
......@@ -185,20 +195,29 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) },
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
},
},
"设置"
),
h(
"op",
{
attrs: { oprate: "remove", title: "删除" },
on: { click: () => this.remove(params.row.id) },
"op", {
attrs: {
oprate: "remove",
title: "删除"
},
on: {
click: () => this.remove(params.row.id)
},
},
"删除"
),
......@@ -211,7 +230,10 @@ export default {
mounted() {
console.log(this);
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -234,7 +256,9 @@ export default {
this.curId = id;
},
removeOk() {
Api.delete({ id: this.curId }).then((r) => {
Api.delete({
id: this.curId
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.deletelModal = false;
......@@ -300,20 +324,25 @@ export default {
},
};
</script>
<style lang="less">
@import "../../../assets/css/custom.less";
.resources-p {
.form-row {
width: 600px;
margin-left: 50px;
.ivu-form-item-label {
color: @form-color;
}
}
.ivu-footer-toolbar-right {
width: 1100px;
position: relative !important;
}
.btn {
position: absolute !important;
top: 12px !important;
......
<template>
<Form ref="form" :model="formItem" :rules="rules" :label-width="90">
<Form ref="form" :model="formItem" :rules="rules" :label-width="110">
<Row>
<Col span="12">
<FormItem label="资源名称" prop="equip_name">
......@@ -13,19 +13,15 @@
</Col>
<Col :span="12">
<FormItem label="工作日历" prop="work">
<Select v-model="formItem1.calendarwork_pk" clearable placeholder="请选择...">
<Select v-model="formItem1.calendarwork_pk" filterable clearable placeholder="请选择...">
<Option v-for="item in workList" :value="item.id" :key="item.calName">{{ item.calName }}</Option>
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="加班日历" prop="overtime">
<Select v-model="formItem2.calendarovertime_pk" clearable placeholder="请选择...">
<Option
v-for="item in overtimeList"
:value="item.id"
:key="item.holidayCalName"
>{{ item.holidayCalName }}</Option>
<Select v-model="formItem2.calendarovertime_pk" filterable clearable placeholder="请选择...">
<Option v-for="item in overtimeList" :value="item.id" :key="item.holidayCalName">{{ item.holidayCalName }}</Option>
</Select>
</FormItem>
</Col>
......@@ -48,8 +44,9 @@
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</Form>
</template>
<script>
import Api from "./api";
export default {
......@@ -76,7 +73,11 @@ export default {
},
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
name: [{
required: true,
message: "必填",
trigger: "blur"
}],
},
};
},
......@@ -109,7 +110,9 @@ export default {
});
},
load(v) {
Api.get({ id: v }).then((r) => {
Api.get({
id: v
}).then((r) => {
this.formItem.equip_name = r.result.title;
this.formItem.equip_id = r.result.code;
this.formItem.capabilityValue = r.result.capabilityValue;
......
<template>
<div>
<div class="mb10 pt5">
<Input v-model="searchValue" placeholder="请输入库位名称" clearable style="width: 240px" />
<Input
v-model="searchValue"
placeholder="请输入库位名称"
clearable
style="width: 240px"
/>
<Button type="primary" class @click="handleSearch">查询</Button>
<div class="fr">
<Button type="primary" @click="add()">新增库位</Button>
......@@ -75,9 +80,15 @@ export default {
},
{
key: "materialTypeName",
title: "物料编号",
title: "物料类型",
align: "left",
},
// {
// key: "materialType",
// title: "物料类别",
// align: "left",
// code: "material.main.type",
// },
{
key: "userName",
title: this.l("userName"),
......
......@@ -249,17 +249,6 @@ export default {
} else {
this.entity.fileId = "";
}
ApiWorkflow.getbyid({
id: "2085025d-9c38-4834-846a-8f9d2f4c8553",
})
.then((res) => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.entity.approvalStatus = 4;
} else {
this.entity.approvalStatus = 1;
}
Api.create(this.entity)
.then((r) => {
if (r.success) {
......@@ -286,12 +275,6 @@ export default {
console.warn(err);
});
}
})
.catch((err) => {
this.$Message.error("操作失败");
console.warn(err);
});
}
}
});
},
......
<style lang="less">
@import "./technolog.less";
.details_box {
background: #f5f7f9;
display: flex;
margin: 0 20px;
flex-direction: column;
.details_body {
flex-grow: 1;
// width: 561px;
text-align: center;
background: white;
.ivu-menu-horizontal {
height: 50px;
line-height: 50px;
border-left: 1px solid #ccc;
background: #f5f7f9;
z-index: 888;
.ivu-menu-item {
width: 140px;
border-right: 1px solid #e0e0e0;
......@@ -24,6 +28,7 @@
border-top: 1px solid #e0e0e0;
background: rgba(243, 243, 243, 1);
}
.ivu-menu-item-active.ivu-menu-item-selected {
background: #fff;
border-top: 2px solid #2d8cf0;
......@@ -31,6 +36,7 @@
}
}
}
.bottom_box {
padding: 5px 20px;
background: white;
......@@ -40,33 +46,23 @@
}
</style>
<template>
<div class="details_box">
<div class="details_box">
<div class="details_body">
<Menu mode="horizontal" theme="light" active-name="0">
<MenuItem name="0" :to="'/technology/details?id='+headerId+'&headerStatus='+headerStatus">工序</MenuItem>
<!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> -->
<MenuItem
name="2"
:to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus"
>质控卡</MenuItem>
<MenuItem
name="3"
:to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId"
>工艺BOM</MenuItem>
<MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus">质控卡</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId">工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="4" :to="'/technology/details/setup?id='+headerId">生产准备</MenuItem>
<MenuItem
name="5"
:to="'/technology/details/routinghcorder?id='+headerId"
v-show="headerStatus==1"
>工艺更改单</MenuItem>
<MenuItem name="5" :to="'/technology/details/routinghcorder?id='+headerId" v-show="headerStatus==1">工艺更改单</MenuItem>
<MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem>
</Menu>
</div>
<div class="bottom_box">
<nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div>
</div>
</div>
</template>
<script>
......@@ -89,7 +85,10 @@ export default {
this.headerStatus = this.$route.query.headerStatus;
this.productBomId = this.$route.query.productBomId;
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
......
<template>
<div>
<div>
<DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false" :page="false">
<template slot="buttons">
<Button type="primary" @click="add" v-show="headerStatus==0||headerStatus==4">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1300" footer-hide>
<component
:is="detail"
:eid="curId"
:headid="hid"
:eName="curName"
:maxNum="maxNum"
@on-close="cancel"
@on-ok="ok"
/>
<component :is="detail" :eid="curId" :headid="hid" :eName="curName" :maxNum="maxNum" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
......@@ -41,7 +34,10 @@ export default {
op: "name",
value: null
},
routingHeaderId: { op: "Equal", value: -1 }
routingHeaderId: {
op: "Equal",
value: -1
}
},
// conditions: { routingHeaderId: { op: "Equal", value: -1 } },
modal: false,
......@@ -50,15 +46,14 @@ export default {
curId: 0,
curName: "",
hid: 0,
columns: [
{
columns: [{
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row.steps,
headerStatus:this.headerStatus,
headerStatus: this.headerStatus,
},
on: {
//监听子组件showDetail事件
......@@ -89,7 +84,6 @@ export default {
title: this.l("equipType"),
align: "left",
easy: true,
hide: true
},
{
key: "resourceCode",
......@@ -197,11 +191,14 @@ export default {
width: 180,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "detail" },
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () =>
this.addStep(
......@@ -211,32 +208,41 @@ export default {
)
}
},
this.headerStatus == 4||this.headerStatus == 0 ? "新增" : ""
this.headerStatus == 4 || this.headerStatus == 0 ? "新增" : ""
),
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
}
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
"op", {
attrs: {
oprate: "edit"
},
this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
on: {
click: () => this.edit(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "编辑" : ""
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
"op", {
attrs: {
oprate: "delete"
},
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : ""
on: {
click: () => this.remove(params.row.id)
}
},
this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
)
]);
}
......@@ -245,7 +251,7 @@ export default {
list: [],
maxNum: 0,
maxNumTemp: 0,
headerStatus:-1,
headerStatus: -1,
};
},
created() {
......@@ -255,7 +261,7 @@ export default {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus=this.$route.query.headerStatus
this.headerStatus = this.$route.query.headerStatus
},
mounted() {
this.load();
......@@ -265,7 +271,10 @@ export default {
// this.easySearch.routingHeaderId.view = this.headerid;
// }
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
......@@ -371,5 +380,6 @@ export default {
}
};
</script>
<style lang="less">
</style>
<template>
<div>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<Col :span="12">
<FormItem :label="l('routingDetail')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
<Option v-for="(item,index) in routingDetailList" :value="item.value" :key="index">{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
......@@ -33,7 +29,7 @@
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
<i-quill v-model="entity.content" :height="260" v-paste="handleImg" border />
</FormItem>
</Col>
</Row>
......@@ -47,14 +43,18 @@
</Col>
</Row>
</Form>
</div>
</div>
</template>
<script>
<script>
import Api from "./api";
import ApiDetail from "../api";
import iQuill from "@/components/quill";
export default {
name: "Add",
components: {
iQuill
},
data() {
return {
submitShow: true, //送审按钮显隐
......@@ -68,16 +68,22 @@ export default {
filePaths: "", //多个文件路径
},
rules: {
title: [{ required: true, message: "必填", trigger: "blur" }],
content: [{ required: true, message: "必填", trigger: "blur" }],
routingDetailId: [
{
title: [{
required: true,
message: "必填",
trigger: "blur"
}],
content: [{
required: true,
message: "必填",
trigger: "blur"
}],
routingDetailId: [{
required: true,
message: "请选择工序",
type: "number",
trigger: "change",
},
],
}, ],
},
routingDetailList: [],
parms: {
......@@ -137,6 +143,26 @@ export default {
}
});
},
handleImg(e) {
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.content += img;
}, 1000);
// new R
}
},
handleClose() {
this.$emit("on-close");
},
......
<template>
<div class="detail">
<div class="detail">
<Row>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('status')"><state code="processCase.status" :value="entity.status+''" type="text" /></Filed>
<Filed :span="12" :name="l('status')">
<state code="processCase.status" :value="entity.status+''" type="text" />
</Filed>
<Filed :span="12" :name="l('creator')">{{entity.creator}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="24" :name="l('content')">{{entity.content}}</Filed>
<Filed :span="24" :name="l('content')">
<div v-html="entity.content" class="tohtml"></div>
</Filed>
<Filed :span="24" :name="l('filePath')">
<files ref="refFile" :parms="parms" unClosable style="display:inline" /></Filed>
<files ref="refFile" :parms="parms" unClosable style="display:inline" />
</Filed>
</Filed>
</Row>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
......@@ -20,8 +26,16 @@ export default {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
name: [{
required: true,
message: "必填",
trigger: "blur"
}],
code: [{
required: true,
message: "必填",
trigger: "blur"
}],
},
parms: {
app: "technology",
......@@ -44,7 +58,9 @@ export default {
window.open(data, "_blank");
},
load(v) {
Api.get({ id: v }).then((r) => {
Api.get({
id: v
}).then((r) => {
this.entity = r.result;
this.parms.eid = r.result.filePaths;
this.$emit("on-load");
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('title')" prop="title" style="width:95%">
......@@ -22,7 +22,7 @@
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content ">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
<i-quill v-model="entity.content" :height="260" v-paste="handleImg" border />
</FormItem>
</Col>
</Row>
......@@ -30,17 +30,26 @@
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</Form>
</template>
<script>
import Api from "./api";
import iQuill from "@/components/quill";
export default {
name: "Edit",
components: {
iQuill
},
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
name: [{
required: true,
message: "必填",
trigger: "blur"
}],
},
parms: {
app: "technology", //服务
......@@ -60,7 +69,9 @@ export default {
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
Api.get({
id: v
}).then((r) => {
this.entity = r.result;
this.parms.eid = r.result.filePaths;
});
......@@ -93,6 +104,26 @@ export default {
handleClose() {
this.$emit("on-close");
},
handleImg(e) {
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.content += img;
}, 1000);
// new R
}
},
l(key) {
key = "remind" + "." + key;
return this.$t(key);
......
<template>
<div>
<div>
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -18,8 +18,9 @@
<Modal v-model="modal" :title="title" width="800" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
......@@ -29,16 +30,24 @@ export default {
return {
action: Api.index,
easySearch: {
keys: { op: "title", value: null },
type: { op: "Equal", value: 2 },
routingHeaderId: { op: "Equal", value: this.headerid },
keys: {
op: "title",
value: null
},
type: {
op: "Equal",
value: 2
},
routingHeaderId: {
op: "Equal",
value: this.headerid
},
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [
{
columns: [{
type: "index",
width: 60,
align: "center",
......@@ -61,11 +70,6 @@ export default {
align: "left",
type: "user",
},
{
key: "content",
title: this.l("content"),
align: "left",
},
{
key: "filePaths",
title: this.l("filePath"),
......@@ -73,10 +77,13 @@ export default {
easy: true,
render: (h, params) => {
return h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) },
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
},
},
"查看"
);
......@@ -95,28 +102,39 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) },
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
},
},
"查看"
),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) },
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
},
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) },
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row.id)
},
},
"删除"
),
......@@ -132,7 +150,10 @@ export default {
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -182,5 +203,6 @@ export default {
},
};
</script>
<style lang="less">
</style>
<template>
<div>
<div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入检测要求/标准指标"
v-model="easySearch.keys.value"
v-width="260"
/>
<Input placeholder="请输入检测要求/标准指标" v-model="easySearch.keys.value" v-width="260" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -25,8 +21,9 @@
<Modal v-model="modal" :title="title" width="1000" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
......@@ -46,11 +43,13 @@ export default {
action: Api.index,
easySearch: {
keys: {
op:
"checkParams,standard",
op: "checkParams,standard",
value: null
},
routingHeaderId: { op: "Equal", value: -1 },
routingHeaderId: {
op: "Equal",
value: -1
},
},
sortType: 'normal',
modal: false,
......@@ -58,21 +57,20 @@ export default {
detail: null,
curId: 0,
hid: 0,
columns: [
{
columns: [{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
high: true,
width: 100,
sortable:true
sortable: true
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
high: true,
tooltip:true,
tooltip: true,
},
{
key: "checkParams",
......@@ -80,7 +78,7 @@ export default {
align: "left",
easy: true,
high: true,
tooltip:true,
tooltip: true,
},
{
key: "fillintype",
......@@ -88,7 +86,7 @@ export default {
align: "center",
high: true,
code: "QC.fillintype",
width:140,
width: 140,
},
{
key: "checkType",
......@@ -96,7 +94,7 @@ export default {
align: "center",
high: true,
code: "QC.checktype",
width:100,
width: 100,
},
{
key: "isphotograph",
......@@ -104,7 +102,7 @@ export default {
align: "center",
high: true,
code: "Process.state",
width:100,
width: 100,
},
{
key: "standard",
......@@ -112,7 +110,7 @@ export default {
align: "left",
easy: true,
high: true,
tooltip:true,
tooltip: true,
},
{
key: "productionRequirement",
......@@ -120,7 +118,7 @@ export default {
align: "left",
easy: true,
high: true,
tooltip:true,
tooltip: true,
},
{
key: "checkContent",
......@@ -128,7 +126,7 @@ export default {
align: "left",
easy: true,
high: true,
tooltip:true,
tooltip: true,
},
{
key: "qualityTemplateName",
......@@ -138,12 +136,17 @@ export default {
hide: true,
high: true,
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
}
},
params.row.qualityTemplateName
)
......@@ -184,32 +187,43 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
}
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
}
},
'编辑'
// this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row.id)
}
},
this.headerStatus == 4||this.headerStatus == 0 ? "删除" : ""
this.headerStatus == 4 || this.headerStatus == 0 ? "删除" : ""
)
]);
}
......@@ -217,7 +231,7 @@ export default {
],
downUrl: fileUrlDown,
fileUrlPath: "",
headerStatus:-1,
headerStatus: -1,
};
},
created() {
......@@ -227,14 +241,17 @@ export default {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
this.hid = Number(this.easySearch.routingHeaderId.value);
this.headerStatus=this.$route.query.headerStatus
this.headerStatus = this.$route.query.headerStatus
},
mounted() {
console.log(this);
this.search();
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -293,5 +310,6 @@ export default {
}
};
</script>
<style lang="less">
</style>
......@@ -105,6 +105,7 @@ import ProductTree from "@/components/page/productTree.vue";
import sendAudit from "./sendAudit.vue";
import routingchangeorder from "../processDesign/Process/routingchangeorder.vue";
import changelist from "../processDesign/Process/changelist.vue";
import ApiWorkflow from "../workflow/process/api";
export default {
components: {
ProductTree,
......@@ -236,21 +237,6 @@ export default {
high: true,
code: "Process.Status"
},
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
// { key: "isMain", title: this.l("isMain"),align: "center",width: 80,high: true,code: "Process.state"},
//{key: "creatorUserId",title: this.l("author"),align: "left", high: true,type: "user",hide: true},
//{key: "versionnotes",title: this.l("versionnotes"),align: "left", high: true,hide: true},
//{key: "versionid", title: this.l("versionid"), align: "left", hide: true, code: "Process.Routing.version"},
{
key: "creationTime",
title: this.$t("creationTime"),
......@@ -351,7 +337,7 @@ export default {
click: () => this.TechnologyChange(params.row)
}
},
params.row.approvalStatus == 1 ? "新增更改单" : ""
this.processStatus == 0 && params.row.approvalStatus == 1 ? "新增更改单" : ""
),
h(
"op", {
......@@ -362,7 +348,18 @@ export default {
click: () => this.sendAuditFun(params.row)
}
},
params.row.approvalStatus == 4 ? "送审" : ""
this.processStatus == 0 && params.row.approvalStatus == 4 ? "送审" : ""
),
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.changeStatus(params.row)
}
},
this.processStatus == 1 && params.row.approvalStatus == 4 ? "启用" : ""
)
]);
}
......@@ -378,6 +375,7 @@ export default {
processviewModal: false,
ModalIm: false,
temTitle: "工艺规程",
processStatus: 0, //工艺规程审核流程停启用状态 0:启用 1:禁用
};
},
created() {
......@@ -396,6 +394,14 @@ export default {
this.treeHeight = window.innerHeight - 120;
})();
};
ApiWorkflow.getbyid({
id: "2085025d-9c38-4834-846a-8f9d2f4c8553",
})
.then((res) => {
if (res.success) {
this.processStatus = res.result.status;
}
})
},
computed: {},
methods: {
......@@ -549,6 +555,24 @@ export default {
this.$refs.changelist.show3 = true;
});
},
//修改工艺规程状态
changeStatus(row) {
let params = row
params.approvalStatus = 1
Api.update(params)
.then((r) => {
if (r.success) {
this.$Message.success("操作成功");
this.$refs.grid.load();
} else {
this.$Message.error("操作失败");
}
})
.catch((err) => {
this.$Message.error("操作失败");
console.warn(err);
});
},
//批量导入start
//导入功能
openModalIm() {
......
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