Commit 8faa183f authored by 赵汉亭's avatar 赵汉亭

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents c0268649 69a0e34e
import request from '@/utils/request'
// 查询客户采购订单列表
export function listOrder(query) {
return request({
url: '/od/purchaseOrder/list',
method: 'get',
params: query
})
}
// 查询客户采购订单详细
export function getOrder(id) {
return request({
url: '/od/purchaseOrder/' + id,
method: 'get'
})
}
export function getSalesOrder(purchaseId) {
return request({
url: '/od/purchaseOrder/getSalesOrder?id=' + purchaseId,
method: 'get'
})
}
// 新增客户采购订单
export function addOrder(data) {
return request({
url: '/od/purchaseOrder',
method: 'post',
data: data
})
}
// 修改客户采购订单
export function updateOrder(data) {
return request({
url: '/od/purchaseOrder',
method: 'put',
data: data
})
}
// 删除客户采购订单
export function delOrder(id) {
return request({
url: '/od/purchaseOrder/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询客户采购订单列表
export function listDetail(query) {
return request({
url: '/md/purchaseOrderDetail/list',
method: 'get',
params: query
})
}
// 查询客户采购订单详细
export function getDetail(id) {
return request({
url: '/md/purchaseOrderDetail/' + id,
method: 'get'
})
}
// 新增客户采购订单
export function addDetail(data) {
return request({
url: '/md/purchaseOrderDetail',
method: 'post',
data: data
})
}
// 修改客户采购订单
export function updateDetail(data) {
return request({
url: '/md/purchaseOrderDetail',
method: 'put',
data: data
})
}
// 删除客户采购订单
export function delDetail(id) {
return request({
url: '/md/purchaseOrderDetail/' + id,
method: 'delete'
})
}
...@@ -17,6 +17,15 @@ export function getOrder(id) { ...@@ -17,6 +17,15 @@ export function getOrder(id) {
}) })
} }
// 查询销售订单详细
export function getOrderDetail(params) {
return request({
url: '/od/salesOrder/detail',
method: 'get',
params
})
}
// 新增销售订单 // 新增销售订单
export function addOrder(data) { export function addOrder(data) {
return request({ return request({
...@@ -35,6 +44,14 @@ export function updateOrder(data) { ...@@ -35,6 +44,14 @@ export function updateOrder(data) {
}) })
} }
// 同步销售订单
export function syncOrder(id) {
return request({
url: '/od/salesOrder/sync/' + id,
method: 'get'
})
}
// 删除销售订单 // 删除销售订单
export function delOrder(id) { export function delOrder(id) {
return request({ return request({
......
import request from '@/utils/request'
// 查询工厂报价列表
export function listFactoryQuote(query) {
return request({
url: '/qt/factoryQuote/list',
method: 'get',
params: query
})
}
// 查询工厂报价详细
export function getFactoryQuote(id) {
return request({
url: '/qt/factoryQuote/' + id,
method: 'get'
})
}
// 新增工厂报价
export function addFactoryQuote(data) {
return request({
url: '/qt/factoryQuote',
method: 'post',
data: data
})
}
// 修改工厂报价
export function updateFactoryQuote(data) {
return request({
url: '/qt/factoryQuote',
method: 'put',
data: data
})
}
// 删除工厂报价
export function delFactoryQuote(id) {
return request({
url: '/qt/factoryQuote/' + id,
method: 'delete'
})
}
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
value: {type: String|Number, required: true}, value: {type: String|Number, required: true},
// 单位: 1元, 0.1角, 0.01分 // 单位: 1元, 0.1角, 0.01分
unit: {type: String|Number, default: 1}, unit: {type: String|Number, default: 1},
prefix: {type: String, default: '¥ '},
placeholder: {type: String}, placeholder: {type: String},
clearable: {type: Boolean, default: false}, clearable: {type: Boolean, default: false},
readonly: {type: Boolean, default: false}, readonly: {type: Boolean, default: false},
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传 请上传
...@@ -93,11 +93,7 @@ export default { ...@@ -93,11 +93,7 @@ export default {
// 然后将数组转为对象数组 // 然后将数组转为对象数组
this.fileList = list.map(item => { this.fileList = list.map(item => {
if (typeof item === "string") { if (typeof item === "string") {
if (item.indexOf(this.baseUrl) === -1) { item = { name: item, url: item };
item = { name: this.baseUrl + item, url: this.baseUrl + item };
} else {
item = { name: item, url: item };
}
} }
return item; return item;
}); });
...@@ -122,7 +118,7 @@ export default { ...@@ -122,7 +118,7 @@ export default {
const findex = this.fileList.map(f => f.name).indexOf(file.name); const findex = this.fileList.map(f => f.name).indexOf(file.name);
if(findex > -1) { if(findex > -1) {
this.fileList.splice(findex, 1); this.fileList.splice(findex, 1);
this.$emit("onRemoved", this.listToString(this.fileList)); this.$emit("onRemoved", this.listToString(this.fileList), this);
} }
}, },
// 上传成功回调 // 上传成功回调
...@@ -132,7 +128,7 @@ export default { ...@@ -132,7 +128,7 @@ export default {
this.fileList = this.fileList.concat(this.uploadList); this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = []; this.uploadList = [];
this.number = 0; this.number = 0;
this.$emit("onUploaded", this.listToString(this.fileList)); this.$emit("onUploaded", this.listToString(this.fileList), this);
this.$modal.closeLoading(); this.$modal.closeLoading();
} }
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<template v-for="item in sapProperties"> <template v-for="item in sapProperties">
<el-col :span="span" :key="item.id"> <el-col :span="span" :key="item.id">
<el-form-item :label="item.name" :prop="key + '.' + item.sapField" <el-form-item :label="item.name" :prop="key + '.' + item.sapField"
:rules="{required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['change']}"> :rules="item.required ? {required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['change']} : null">
<el-input-all v-model="sapData[key][item.sapField]" :item="item"/> <el-input-all v-model="sapData[key][item.sapField]" :item="item"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
let properties = sapPropertyMap[key] let properties = sapPropertyMap[key]
for (let property of properties) { for (let property of properties) {
let propertyData = data[property.relationField] let propertyData = data[property.relationField]
sapData[key][property.sapField] = propertyData || sapData[key][property.sapField] sapData[key][property.sapField] = propertyData || sapData[key][property.sapField] || ''
} }
} }
this.sapData = sapData this.sapData = sapData
...@@ -159,6 +159,7 @@ export default { ...@@ -159,6 +159,7 @@ export default {
} }
.footer { .footer {
margin: 10px;
text-align: right; text-align: right;
} }
......
...@@ -3,6 +3,7 @@ import Vuex from 'vuex' ...@@ -3,6 +3,7 @@ import Vuex from 'vuex'
import app from './modules/app' import app from './modules/app'
import user from './modules/user' import user from './modules/user'
import tagsView from './modules/tagsView' import tagsView from './modules/tagsView'
import order from './modules/order'
import permission from './modules/permission' import permission from './modules/permission'
import settings from './modules/settings' import settings from './modules/settings'
import getters from './getters' import getters from './getters'
...@@ -14,6 +15,7 @@ const store = new Vuex.Store({ ...@@ -14,6 +15,7 @@ const store = new Vuex.Store({
app, app,
user, user,
tagsView, tagsView,
order,
permission, permission,
settings settings
}, },
......
import {listChannel} from '@/api/mes/md/saleOrder/channel'
import {listGroup} from '@/api/mes/md/saleOrder/group'
import {listOffice} from '@/api/mes/md/saleOrder/office'
import {listOrg} from '@/api/mes/md/saleOrder/org'
import {listType} from '@/api/mes/md/saleOrder/type'
import {listUnit} from '@/api/mes/md/unit'
import {listClause} from '@/api/mes/md/clause'
import {listCurrency} from '@/api/mes/md/currency'
import {listReason} from '@/api/mes/md/reason'
import {listPoint} from '@/api/mes/md/point'
import {listClause as listPaymentClause } from '@/api/mes/md/paymentClause'
const order = {
namespaced: true,
state: {
saleChannel: [],
saleGroup: [],
saleOffice: [],
saleOrg: [],
saleType: [],
saleUnit: [],
saleClause: [],
saleCurrency: [],
salePaymentClause: [],
saleReason: [],
saleShipmentPoint: [],
},
mutations: {
SET_SALE_CHANNEL(state, data) {
state.saleChannel = data
},
SET_SALE_GROUP(state, data) {
state.saleGroup = data
},
SET_SALE_OFFICE(state, data) {
state.saleOffice = data
},
SET_SALE_ORG(state, data) {
state.saleOrg = data
},
SET_SALE_TYPE(state, data) {
state.saleType = data
},
SET_SALE_UNIT(state, data) {
state.saleUnit = data
},
SET_SALE_CLAUSE(state, data) {
state.saleClause = data
},
SET_SALE_CURRENCY(state, data) {
state.saleCurrency = data
},
SET_SALE_PAYMENT_CLAUSE(state, data) {
state.salePaymentClause = data
},
SET_SALE_REASON(state, data) {
state.saleReason = data
},
SET_SALE_SHIPMENT_POINT(state, data) {
state.saleShipmentPoint = data
},
},
actions: {
getSaleChannel({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleChannel && state.saleChannel.length) return resolve(state.saleChannel)
listChannel().then(res => {
commit('SET_SALE_CHANNEL', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleGroup({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleGroup && state.saleGroup.length) return resolve(state.saleGroup)
listGroup().then(res => {
commit('SET_SALE_GROUP', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleOffice({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleOffice && state.saleOffice.length) return resolve(state.saleOffice)
listOffice().then(res => {
commit('SET_SALE_OFFICE', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleOrg({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleOrg && state.saleOrg.length) return resolve(state.saleOrg)
listOrg().then(res => {
commit('SET_SALE_ORG', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleType({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleType && state.saleType.length) return resolve(state.saleType)
listType().then(res => {
commit('SET_SALE_TYPE', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleUnit({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleUnit && state.saleUnit.length) return resolve(state.saleUnit)
listUnit().then(res => {
commit('SET_SALE_UNIT', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleClause({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleClause && state.saleClause.length) return resolve(state.saleClause)
listClause().then(res => {
commit('SET_SALE_CLAUSE', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleCurrency({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleCurrency && state.saleCurrency.length) return resolve(state.saleCurrency)
listCurrency().then(res => {
commit('SET_SALE_CURRENCY', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSalePaymentClause({commit, state}) {
return new Promise((resolve, reject) => {
if (state.salePaymentClause && state.salePaymentClause.length) return resolve(state.salePaymentClause)
listReason().then(res => {
commit('SET_SALE_PAYMENT_CLAUSE', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleReason({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleReason && state.saleReason.length) return resolve(state.saleReason)
listPoint().then(res => {
commit('SET_SALE_REASON', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
getSaleShipmentPoint({commit, state}) {
return new Promise((resolve, reject) => {
if (state.saleShipmentPoint && state.saleShipmentPoint.length) return resolve(state.saleShipmentPoint)
listPaymentClause().then(res => {
commit('SET_SALE_SHIPMENT_POINT', res.rows)
resolve(res.rows)
}).catch(() => reject())
})
},
}
}
export default order
This diff is collapsed.
<template> <template>
<div class="index"> <div class="app-container">
purchase order <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户" prop="clientId">
<el-select v-model="queryParams.clientId" placeholder="请选择客户" clearable filterable remote :remote-method="getClientList">
<el-option v-for="item in clientList" :key="item.clientId" :value="item.clientId" :label="item.clientName"/>
</el-select>
</el-form-item>
<el-form-item label="交货日期" prop="deliveryDate">
<el-date-picker clearable
v-model="queryParams.deliveryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择交货日期">
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-input
v-model="queryParams.state"
placeholder="请输入状态"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="来源文件" prop="source">
<el-input
v-model="queryParams.source"
placeholder="请输入来源文件"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['md:purchaseOrder:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="订单编号" prop="orderNo" />
<el-table-column label="客户编号" prop="clientNo" />
<el-table-column label="客户名称" prop="clientName" />
<el-table-column label="交货日期" prop="deliveryDate" width="180">
<template slot-scope="{row}">
<span>{{ parseTime(row.deliveryDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" />
<el-table-column label="订单状态" prop="state">
<template slot-scope="{row}">
{{ dict.type.sales_order_state.find(item => item.value == row.state).label }}
</template>
</el-table-column>
<el-table-column label="来源文件" prop="source" />
<el-table-column label="操作" class-name="small-padding fixed-width" width="200">
<template slot-scope="{row}">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="onShowDetail(row)"
v-hasPermi="['md:order:query']"
>查看</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="toSalesEdit(row)"
v-hasPermi="['md:order:edit']"
>生成订单</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(row)"
v-hasPermi="['md:order:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div> </div>
</template> </template>
<script> <script>
import { delOrder, listOrder } from '@/api/mes/od/purchaseOrder'
import { listClient } from '@/api/mes/md/client'
export default { export default {
name: "PurchaseOrder",
dicts: ['mes_client_type','sys_yes_no', 'sales_order_state'],
data() { data() {
return {} return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户采购订单表格数据
orderList: [],
clientList: [],
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
orderNo: null, clientId: null, deliveryDate: null, state: null, source: null
},
};
}, },
methods: {},
created() { created() {
this.getList();
this.getClientList()
},
methods: {
/** 查询客户采购订单列表 */
getList() {
this.loading = true;
listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
getClientList(key) {
listClient({ clientName: key, pageNum: 1, pageSize: 100 }).then(res => this.clientList = res.rows)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
toSalesEdit(row) {
let id = row ? row.id : this.ids[0]
this.$router.push('/order/sales/detail?purchaseId=' + id)
},
onShowDetail(row) {
let id = row ? row.id : this.ids[0]
this.$router.push('/order/purchaseEdit?id=' + id)
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除客户采购订单编号为"' + ids + '"的数据项?').then(function() {
return delOrder(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('md/order/export', {
...this.queryParams
}, `order_${new Date().getTime()}.xlsx`)
}
} }
} };
</script> </script>
<style scoped>
</style>
This diff is collapsed.
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<el-table-column label="订单编号" prop="orderNo"/> <el-table-column label="订单编号" prop="orderNo"/>
<el-table-column label="客户编号" prop="mdClient.clientCode"/> <el-table-column label="客户编号" prop="clientNo"/>
<el-table-column label="交货期" prop="deliveryDate" width="180"/> <el-table-column label="交货期" prop="deliveryDate" width="180"/>
<el-table-column label="总金额" prop="amount" :formatter="r => this.formatMoney(r.amount)"/> <el-table-column label="总金额" prop="amount" :formatter="r => this.formatMoney(r.amount)"/>
<el-table-column label="跟单人" prop="merchandiser" <el-table-column label="跟单人" prop="merchandiser"
...@@ -125,6 +125,14 @@ ...@@ -125,6 +125,14 @@
v-hasPermi="['od:salesOrder:remove']" v-hasPermi="['od:salesOrder:remove']"
>删除 >删除
</el-button> </el-button>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="onSync(scope.row)"
v-hasPermi="['od:salesOrder:edit']"
>同步
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -212,6 +220,16 @@ export default { ...@@ -212,6 +220,16 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.$router.push('/order/sales/detail?id=' + row.id) this.$router.push('/order/sales/detail?id=' + row.id)
}, },
/** 同步数据 */
onSync(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认同步销售订单编号为"' + ids + '"的数据项?').then(() => {
syncOrder(ids).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
})
})
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids
......
This diff is collapsed.
...@@ -146,9 +146,9 @@ export default { ...@@ -146,9 +146,9 @@ export default {
}; };
}, },
computed: { computed: {
title () { title() {
return '设置' + this.process.itemName + '物料' return "设置" + this.process.itemName + "物料";
} },
}, },
watch: { watch: {
process: { process: {
...@@ -216,7 +216,9 @@ export default { ...@@ -216,7 +216,9 @@ export default {
}, },
/** 提交编辑关联信息 */ /** 提交编辑关联信息 */
submitEditConnect() { submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, this.form); this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false; this.editConnectVisible = false;
}, },
}, },
......
...@@ -298,10 +298,10 @@ export default { ...@@ -298,10 +298,10 @@ export default {
let thisObj = this; let thisObj = this;
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (thisObj.optType == "add") { if (thisObj.optType == 'add') {
thisObj.tableData.unshift({ ...thisObj.form }); thisObj.tableData.unshift({ ...thisObj.form });
} else { } else {
thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form); thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form)
} }
thisObj.showFlag = false; thisObj.showFlag = false;
} }
......
...@@ -8,9 +8,15 @@ ...@@ -8,9 +8,15 @@
prop="linkType" prop="linkType"
align="center" align="center"
/> />
<el-table-column label="工作站" prop="workstationId" align="center" /> <el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="甘特图显示颜色" prop="colorCode" align="center" /> <el-table-column label="甘特图显示颜色" prop="colorCode" align="center" />
<el-table-column v-if="mode != 'info'" label="操作" align="center" width="150"> <el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="150"
>
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
...@@ -42,7 +48,7 @@ ...@@ -42,7 +48,7 @@
v-dialogDrag v-dialogDrag
:visible.sync="showFlag" :visible.sync="showFlag"
width="800px" width="800px"
title="添加工序" title="工序修改"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -54,75 +60,31 @@ ...@@ -54,75 +60,31 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="组件数量" prop="quantity"> <el-form-item label="工作站" prop="workstationId">
<el-input
type="number"
v-model="form.quantity"
placeholder="请输入组件数量"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
placeholder="请输入计量单位"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报废百分比" prop="scrapPercentage">
<el-input
v-model="form.scrapPercentage"
placeholder="请输入报废百分比"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代组" prop="alternativeGroup">
<el-input
v-model="form.alternativeGroup"
placeholder="请输入替代组"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代优先级" prop="alternativePriorities">
<el-input
v-model="form.alternativePriorities"
placeholder="请输入替代优先级"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="策略" prop="alternativeStrategy">
<el-input
v-model="form.alternativeStrategy"
placeholder="请输入策略"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用概率" prop="alternativeProbability">
<el-input <el-input
v-model="form.alternativeProbability" v-model="form.workstationName"
placeholder="请输入使用概率" disabled
></el-input> placeholder="请选择工作站信息"
>
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect
ref="WorkstationSelect"
:processId="form.processId"
@onSelected="onWorkstationSelected"
></WorkstationSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="BOM行备注" prop="bomItemRemark"> <el-form-item label="标准工时" prop="stdWorkingTime">
<el-input <el-input
v-model="form.bomItemRemark" type="number"
placeholder="请输入BOM行备注" v-model="form.stdWorkingTime"
></el-input> placeholder="请输入标准工时"
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
placeholder="请输入物料备注"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -139,9 +101,10 @@ ...@@ -139,9 +101,10 @@
<script> <script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue"; import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue"; import ProcessProd from "./ProcessProd.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default { export default {
components: { ItemBomSelect, ProcessProd }, components: { ItemBomSelect, ProcessProd, WorkstationSelect },
inject: ['mode'], inject: ["mode"],
props: { props: {
bomList: { bomList: {
type: Array, type: Array,
...@@ -158,15 +121,9 @@ export default { ...@@ -158,15 +121,9 @@ export default {
rules: {}, rules: {},
/**表单初始化数据 */ /**表单初始化数据 */
form: { form: {
quantity: "", stdWorkingTime: "",
unitOfMeasure: "", workstationId: "",
scrapPercentage: "", workstationName: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
}, },
currentRow: {}, currentRow: {},
currentRowIndex: undefined, currentRowIndex: undefined,
...@@ -174,9 +131,9 @@ export default { ...@@ -174,9 +131,9 @@ export default {
}, },
methods: { methods: {
setList(rows) { setList(rows) {
this.tableData = rows.map(item => { this.tableData = rows.map((item) => {
item.processItemList = [] item.processItemList = [];
return item return item;
}); });
}, },
/** 更新工序的物料信息 */ /** 更新工序的物料信息 */
...@@ -199,6 +156,10 @@ export default { ...@@ -199,6 +156,10 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.showFlag = false; this.showFlag = false;
this.tableData.splice(this.currentRowIndex, 1, {
...this.currentRow,
...this.form,
});
} }
}); });
}, },
...@@ -208,22 +169,27 @@ export default { ...@@ -208,22 +169,27 @@ export default {
/**重置表单 */ /**重置表单 */
resetForm() { resetForm() {
this.form = { this.form = {
quantity: "", stdWorkingTime: "",
unitOfMeasure: "", workstationId: "",
scrapPercentage: "", workstationName: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
}; };
}, },
/**重置组件状态 */ /**重置组件状态 */
resetState() { resetState() {
this.resetForm() this.resetForm();
this.tableData = [] this.tableData = [];
} },
// 查询工作站信息
handleWorkstationSelect() {
this.$refs.WorkstationSelect.showFlag = true;
},
onWorkstationSelected(row) {
if (row != undefined && row != null) {
this.form.workstationId = row.workstationId;
this.form.workstationName = row.workstationName;
this.form.stdWorkingTime = row.stdWorkingTime;
}
},
}, },
}; };
</script> </script>
......
...@@ -32,17 +32,6 @@ ...@@ -32,17 +32,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:pro:productionMake:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
...@@ -118,10 +107,8 @@ ...@@ -118,10 +107,8 @@
align="center" align="center"
prop="identifyingDate" prop="identifyingDate"
/> />
<el-table-column label="印刷正面颜色" width="120" align="center" prop="printingFrontcolor" /> <el-table-column label="印刷正面颜色" width="120" align="center" prop="printingFrontcolorName" />
<el-table-column label="印刷背面颜色" width="120" align="center" prop="printingBackcolor" /> <el-table-column label="印刷背面颜色" width="120" align="center" prop="printingBackcolorName" />
<el-table-column label="产品正面" width="120" align="center" prop="frontImg" />
<el-table-column label="产品背面" width="120" align="center" prop="backImg" />
<el-table-column label="测试标准" align="center" prop="testStandard" /> <el-table-column label="测试标准" align="center" prop="testStandard" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column <el-table-column
...@@ -169,15 +156,6 @@ ...@@ -169,15 +156,6 @@
v-hasPermi="['mes:pro:productionMake:remove']" v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button >删除</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.productionMakeStatus == 1"
@click="handleStartMake(scope.row)"
v-hasPermi="['mes:pro:productionMake:update']"
>开始制作</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -247,12 +225,12 @@ export default { ...@@ -247,12 +225,12 @@ export default {
productionMakeStatus: null, productionMakeStatus: null,
}, },
options: [ options: [
{ value: "审批中", label: "审批中" }, { value: "0", label: "待检查" },
{ value: "待制作", label: "待制作" }, { value: "1", label: "待制作" },
{ value: "制造中", label: "制造中" }, { value: "2", label: "制造中" },
{ value: "待质检", label: "待质检" }, { value: "3", label: "待质检" },
{ value: "待确认", label: "待确认" }, { value: "4", label: "待确认" },
{ value: "已完成", label: "已完成" }, { value: "5", label: "已完成" },
], ],
// 表单参数 // 表单参数
......
...@@ -74,38 +74,45 @@ ...@@ -74,38 +74,45 @@
<el-row> <el-row>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="印刷正面颜色" prop="printingFrontcolor"> <el-form-item label="印刷正面颜色" prop="printingFrontcolor">
<el-input v-model="form.printingFrontcolor" placeholder="请输入印刷正面颜色"> <el-input v-model="form.printingFrontcolorName"
readonly
placeholder="请输入印刷正面颜色">
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['printingFrontcolorSelect'].showFlag = true"
></el-button>
</el-input> </el-input>
<ColorSelect
ref="printingFrontcolorSelect"
@onSelected="onPrintingFrontcolorSelected"
>
</ColorSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="印刷背面颜色" prop="printingBackcolor"> <el-form-item label="印刷背面颜色" prop="printingBackcolor">
<el-input <el-input
v-model="form.printingBackcolor" readonly
v-model="form.printingBackcolorName"
placeholder="请输入印刷背面颜色" placeholder="请输入印刷背面颜色"
></el-input> >
</el-form-item> <el-button
</el-col> slot="append"
<el-col :md="8" :xs="12"> icon="el-icon-search"
<el-form-item label="产品正面" prop="frontImg"> @click="$refs['printingBackcolorSelect'].showFlag = true"
<el-input ></el-button>
v-model="form.frontImg" </el-input>
placeholder="请选择产品正面" <ColorSelect
></el-input> ref="printingBackcolorSelect"
</el-form-item> @onSelected="onPrintingBackcolorSelected"
</el-col> >
<el-col :md="8" :xs="12"> </ColorSelect>
<el-form-item label="产品背面" prop="backImg">
<el-input
v-model="form.backImg"
placeholder="请输入产品背面"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
...@@ -118,6 +125,19 @@ ...@@ -118,6 +125,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :md="8" :xs="12">
<el-form-item label="产品正面" prop="frontImg">
<ImageUpload :limit="1" :value="form.frontImg" fieldName="frontImg" :fileSize="5"
@onUploaded="handleImgUploaded" @onRemoved="handleImgRemoved"></ImageUpload>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="产品背面" prop="backImg">
<ImageUpload :limit="1" :value="form.backImg" fieldName="backImg" :fileSize="5" @onUploaded="handleImgUploaded" @onRemoved="handleImgRemoved"></ImageUpload>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<el-tabs type="border-card" @tab-click="tabClick"> <el-tabs type="border-card" @tab-click="tabClick">
...@@ -140,13 +160,14 @@ import ItemSelect from "@/components/itemSelect/single.vue"; ...@@ -140,13 +160,14 @@ import ItemSelect from "@/components/itemSelect/single.vue";
import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue"; import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue";
import { listRouteprocess } from "@/api/mes/pro/routeprocess"; import { listRouteprocess } from "@/api/mes/pro/routeprocess";
import { closeOpenPage } from "@/plugins/tab"; import { closeOpenPage } from "@/plugins/tab";
import ColorSelect from "@/components/colorSelect/index.vue";
//新增方法的js //新增方法的js
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake"; import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake";
import { getProductionRequest } from "@/api/mes/pro/productionRequest"; import { getProductionRequest } from "@/api/mes/pro/productionRequest";
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect }, components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect, ColorSelect },
dicts: [], dicts: [],
provide() { provide() {
return { return {
...@@ -184,8 +205,10 @@ export default { ...@@ -184,8 +205,10 @@ export default {
identifyingDate: null, identifyingDate: null,
printingFrontcolor: null, printingFrontcolor: null,
printingBackcolor: null, printingBackcolor: null,
shoeimg: null, printingFrontcolorName: null,
prototype: null, printingBackcolorName: null,
frontImg: null,
backImg: null,
productionMakeStatus: null, productionMakeStatus: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
...@@ -287,6 +310,7 @@ export default { ...@@ -287,6 +310,7 @@ export default {
const processList = this.$refs.ProogingProcessRef.getComData(); const processList = this.$refs.ProogingProcessRef.getComData();
const params = { const params = {
...this.form, ...this.form,
'productionRequestId':this.$route.query.productionRequestId,
bomList, bomList,
processList, processList,
}; };
...@@ -340,8 +364,10 @@ export default { ...@@ -340,8 +364,10 @@ export default {
identifyingDate: null, identifyingDate: null,
printingFrontcolor: null, printingFrontcolor: null,
printingBackcolor: null, printingBackcolor: null,
shoeimg: null, printingFrontcolorName: null,
prototype: null, printingBackcolorName: null,
frontImg: null,
backImg: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
...@@ -351,6 +377,31 @@ export default { ...@@ -351,6 +377,31 @@ export default {
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
this.gCode(); this.gCode();
}, },
onPrintingBackcolorSelected(obj) {
if (obj != undefined && obj != null) {
obj.forEach((element) => {
this.form.printingBackcolor = element.colorId;
this.form.printingBackcolorName = element.colorName;
});
}
},
onPrintingFrontcolorSelected(obj) {
if (obj != undefined && obj != null) {
obj.forEach((element) => {
this.form.printingFrontcolor = element.colorId;
this.form.printingFrontcolorName = element.colorName;
});
}
},
//图片上传成功
handleImgUploaded(imgUrl, obj){
this.form[obj.$attrs.fieldName] = imgUrl;
},
//图片移除
handleImgRemoved(imgUrl, obj){
this.form[obj.$attrs.fieldName] = null;
},
}, },
}; };
</script> </script>
......
...@@ -487,15 +487,15 @@ ...@@ -487,15 +487,15 @@
return '否'; return '否';
} }
}, },
}, // 生成制作单
// 生成制作单 generate(row) {
generate(row) { // 跳转到制作单界面
// 跳转到制作单界面 const prototypeRequestId = row.productionRequestId || this.ids;
const prototypeRequestId = row.productionRequestId || this.ids; this.$router.push(
this.$router.push( "/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId );
); return;
return; },
}, },
}; };
</script> </script>
...@@ -150,14 +150,6 @@ ...@@ -150,14 +150,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12">
<el-form-item label="鞋图" prop="shoeImg">
<el-input
v-model="form.shoeImg"
placeholder="请选鞋图"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="样品" prop="prototype"> <el-form-item label="样品" prop="prototype">
<el-input <el-input
...@@ -179,6 +171,13 @@ ...@@ -179,6 +171,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :md="8" :xs="12">
<el-form-item label="鞋图" prop="shoeImg">
<ImageUpload :limit="1" :value="form.shoeImg" :fileSize="5" @onUploaded="handleImgUploaded" @onRemoved="handleImgRemoved"></ImageUpload>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<el-tabs type="border-card" @tab-click="tabClick"> <el-tabs type="border-card" @tab-click="tabClick">
...@@ -388,6 +387,14 @@ ...@@ -388,6 +387,14 @@
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
this.gCode(); this.gCode();
}, },
//图片上传成功
handleImgUploaded(imgUrl){
this.form.shoeImg = imgUrl;
},
//图片移除
handleImgRemoved(imgUrl){
this.form.shoeImg = null;
},
}, },
}; };
</script> </script>
......
...@@ -158,14 +158,6 @@ ...@@ -158,14 +158,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12">
<el-form-item label="鞋图" prop="shoeImg">
<el-input
v-model="form.shoeImg"
placeholder="请选鞋图"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="样品" prop="prototype"> <el-form-item label="样品" prop="prototype">
<el-input <el-input
...@@ -188,6 +180,13 @@ ...@@ -188,6 +180,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :md="8" :xs="12">
<el-form-item label="鞋图" prop="shoeImg">
<ImageUpload :limit="1" :value="form.shoeImg" :fileSize="5" @onUploaded="handleImgUploaded" @onRemoved="handleImgRemoved"></ImageUpload>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<el-tabs type="border-card" @tab-click="tabClick"> <el-tabs type="border-card" @tab-click="tabClick">
...@@ -205,6 +204,7 @@ ...@@ -205,6 +204,7 @@
<script> <script>
import { genCode } from "@/api/system/autocode/rule"; import { genCode } from "@/api/system/autocode/rule";
import ProogingBom from "./components/ProogingBom.vue"; import ProogingBom from "./components/ProogingBom.vue";
import ImageUpload from "@/components/ImageUpload/index.vue"
import ProogingProcess from "./components/ProogingProcess.vue"; import ProogingProcess from "./components/ProogingProcess.vue";
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
import FactorySelect from "@/components/FactorySelect/index.vue"; import FactorySelect from "@/components/FactorySelect/index.vue";
...@@ -218,7 +218,7 @@ import { ...@@ -218,7 +218,7 @@ import {
} from "@/api/mes/pro/productionRequest"; } from "@/api/mes/pro/productionRequest";
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect, FactorySelect }, components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect, FactorySelect, ImageUpload },
dicts: [], dicts: [],
provide() { provide() {
return { return {
...@@ -392,6 +392,14 @@ export default { ...@@ -392,6 +392,14 @@ export default {
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
}, },
//图片上传成功
handleImgUploaded(imgUrl){
this.form.shoeImg = imgUrl;
},
//图片移除
handleImgRemoved(imgUrl){
this.form.shoeImg = null;
},
}, },
}; };
</script> </script>
......
...@@ -124,6 +124,16 @@ ...@@ -124,6 +124,16 @@
v-hasPermi="['mes:pro:workorder:export']" v-hasPermi="['mes:pro:workorder:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
@click="handleDofinish"
v-hasPermi="['mes:pro:workorder:dofinish']"
>生成任务单</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -134,6 +144,8 @@ ...@@ -134,6 +144,8 @@
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
> >
<!-- 新增复选框 -->
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工单编码" width="180" prop="workorderCode" > <el-table-column label="工单编码" width="180" prop="workorderCode" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -155,6 +167,7 @@ ...@@ -155,6 +167,7 @@
<dict-tag :options="dict.type.mes_workorder_sourcetype" :value="scope.row.orderSource"/> <dict-tag :options="dict.type.mes_workorder_sourcetype" :value="scope.row.orderSource"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工艺名称" width="140" align="center" prop="routeName" />
<el-table-column label="订单编号" width="140" align="center" prop="sourceCode" /> <el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />
<el-table-column label="产品编号" width="120" align="center" prop="productCode" /> <el-table-column label="产品编号" width="120" align="center" prop="productCode" />
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/> <el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
...@@ -295,14 +308,14 @@ ...@@ -295,14 +308,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="产品编号" prop="productCode"> <el-form-item label="产品编号" prop="productCode">
<el-input v-model="form.productCode" placeholder="请选择产品" > <el-input v-model="form.productCode" placeholder="请选择产品" >
<el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button> <el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button>
</el-input> </el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect> <ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产品名称" prop="productName"> <el-form-item label="产品名称" prop="productName">
<el-input v-model="form.productName" placeholder="请选择产品" disabled/> <el-input v-model="form.productName" placeholder="请选择产品" disabled/>
...@@ -463,6 +476,7 @@ export default { ...@@ -463,6 +476,7 @@ export default {
productCode: null, productCode: null,
productName: null, productName: null,
productSpc: null, productSpc: null,
routeName: null,
unitOfMeasure: null, unitOfMeasure: null,
quantity: null, quantity: null,
quantityProduced: null, quantityProduced: null,
...@@ -561,6 +575,7 @@ export default { ...@@ -561,6 +575,7 @@ export default {
productCode: null, productCode: null,
productName: null, productName: null,
productSpc: null, productSpc: null,
routeName: null,
unitOfMeasure: null, unitOfMeasure: null,
quantity: null, quantity: null,
quantityProduced: null, quantityProduced: null,
...@@ -636,10 +651,11 @@ export default { ...@@ -636,10 +651,11 @@ export default {
handleView(row){ handleView(row){
this.reset(); this.reset();
this.getTreeselect(); this.getTreeselect();
const workorderId = row.workorderId || this.ids;
this.$router.push( this.$router.push(
"/mes/pro/workorder/info?workorderId=" + workorderId "/mes/pro/workorder/info?workorderId=" + workorderId
); );
// this.reset(); // this.reset();
// this.getTreeselect(); // this.getTreeselect();
// const workorderId = row.workorderId || this.ids; // const workorderId = row.workorderId || this.ids;
...@@ -702,6 +718,15 @@ export default { ...@@ -702,6 +718,15 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
},
/** 完成任务单操作 */
handleDofinish(row) {
this.$modal.confirm('是否完成工单编号"' + row.workorderCode + '"的数据项?').then(function() {
return dofinish(row.workorderId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("生成成功");
}).catch(() => {});
}, },
handleSelectProduct(){ handleSelectProduct(){
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.showFlag = true;
......
...@@ -101,6 +101,26 @@ ...@@ -101,6 +101,26 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :md="8" :xs="12" style="height: 50.5px">
<el-form-item label="工艺名称" prop="routeId">
<el-input
v-model="form.routeName"
readonly
placeholder="请选择工艺路线"
>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['RoutesProcessSelectRef'].showFlag = true"
></el-button>
</el-input>
<RoutesProcessSelect
ref="RoutesProcessSelectRef"
@onSelected="onRoutesProcessSelect"
/>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产品编号" prop="productCode"> <el-form-item label="产品编号" prop="productCode">
<el-input v-model="form.productCode" placeholder="请选择产品" > <el-input v-model="form.productCode" placeholder="请选择产品" >
...@@ -253,6 +273,7 @@ export default { ...@@ -253,6 +273,7 @@ export default {
workorderCode: "", workorderCode: "",
workorderName: "", workorderName: "",
orderSource: "", orderSource: "",
routeName: "",
sourceCode: "", sourceCode: "",
productId: "", productId: "",
productCode: "", productCode: "",
...@@ -328,6 +349,7 @@ export default { ...@@ -328,6 +349,7 @@ export default {
}, },
methods: { methods: {
/** 查询生产工单下拉树结构 */ /** 查询生产工单下拉树结构 */
getTreeselect() { getTreeselect() {
...@@ -445,7 +467,6 @@ export default { ...@@ -445,7 +467,6 @@ export default {
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.routeId = row.routeId; this.form.routeId = row.routeId;
this.form.routeName = row.routeName; this.form.routeName = row.routeName;
const params = { const params = {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
...@@ -510,6 +531,7 @@ export default { ...@@ -510,6 +531,7 @@ export default {
workorderId: null, workorderId: null,
workorderCode: null, workorderCode: null,
workorderName: null, workorderName: null,
routeName: null,
workorderType: 'SELF', workorderType: 'SELF',
orderSource: null, orderSource: null,
sourceCode: null, sourceCode: null,
......
This diff is collapsed.
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