Commit bfc8afc1 authored by 何远江's avatar 何远江

页面样式调整

parent 130d00b5
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="品牌名称" prop="brandName"> <el-form-item label="品牌名称" prop="brandName">
<el-input <el-input
v-model="queryParams.brandName" v-model="queryParams.brandName"
placeholder="请输入品牌名称" placeholder="请输入品牌名称"
...@@ -136,7 +136,11 @@ ...@@ -136,7 +136,11 @@
row-key="brandQuotationId" row-key="brandQuotationId"
default-expand-all default-expand-all
> >
<el-table-column label="品牌报价单编码" width="180" prop="brandQuotationCode"> <el-table-column
label="品牌报价单编码"
width="140"
prop="brandQuotationCode"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -149,13 +153,18 @@ ...@@ -149,13 +153,18 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="品牌报价名称" label="品牌报价名称"
width="180"
align="center" align="center"
prop="brandQuotationName" prop="brandQuotationName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="金额" width="180" align="center" prop="amount" :formatter="r => this.formatMoney(r.amount)"/> <el-table-column
<el-table-column label="金额"
width="120"
align="center"
prop="amount"
:formatter="(r) => this.formatMoney(r.amount)"
/>
<el-table-column
label="品牌名称" label="品牌名称"
width="120" width="120"
align="center" align="center"
...@@ -169,12 +178,13 @@ ...@@ -169,12 +178,13 @@
prop="itemName" prop="itemName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="工艺路线名称" align="center" prop="routeName"> <el-table-column show-overflow-tooltip label="工艺路线名称" align="center" prop="routeName">
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" />
<el-table-column <el-table-column
label="操作" label="操作"
width="200px" width="200px"
fixed="right"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
...@@ -241,7 +251,13 @@ import Treeselect from "@riophae/vue-treeselect"; ...@@ -241,7 +251,13 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
//导入品牌报价js //导入品牌报价js
import { listBrandQuotation, getBrandQuotation, delBrandQuotation, addBrandQuotation, updateBrandQuotation } from "@/api/mes/dv/brandquotation"; import {
listBrandQuotation,
getBrandQuotation,
delBrandQuotation,
addBrandQuotation,
updateBrandQuotation,
} from "@/api/mes/dv/brandquotation";
export default { export default {
name: "PrototypeRequest", name: "PrototypeRequest",
...@@ -412,7 +428,9 @@ export default { ...@@ -412,7 +428,9 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm('是否确认删除编号为"' + row.brandQuotationId + '"的品牌报价单?') .confirm(
'是否确认删除编号为"' + row.brandQuotationId + '"的品牌报价单?'
)
.then(function () { .then(function () {
return delBrandQuotation(row.brandQuotationId); return delBrandQuotation(row.brandQuotationId);
}) })
...@@ -455,15 +473,14 @@ export default { ...@@ -455,15 +473,14 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
// 生成制作单 // 生成制作单
generatea(row) { generatea(row) {
// 跳转到制作单界面 // 跳转到制作单界面
const prototypeRequestId = row.prototypeRequestId || this.ids; const prototypeRequestId = row.prototypeRequestId || this.ids;
this.$router.push( this.$router.push(
"/mes/pro/prototypeMake/apply?prototypeRequestId=" + prototypeRequestId "/mes/pro/prototypeMake/apply?prototypeRequestId=" + prototypeRequestId
); );
return; return;
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="form-page" v-loading="loading"> <div v-loading="loading">
<PageTitle> <PageTitle>
{{ pageTitle }} {{ pageTitle }}
<!-- 申请按钮显示 --> <!-- 申请按钮显示 -->
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
label-width="100px" label-width="100px"
> >
<el-row> <el-row>
<el-col :md="6" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item prop="brandQuotationCode"> <el-form-item label="编码" prop="brandQuotationCode">
<template slot="label"> 编码 </template>
<el-input <el-input
disabled disabled
v-model="form.brandQuotationCode" v-model="form.brandQuotationCode"
...@@ -35,7 +34,7 @@ ...@@ -35,7 +34,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="6" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="名称" prop="brandQuotationName"> <el-form-item label="名称" prop="brandQuotationName">
<el-input <el-input
v-model="form.brandQuotationName" v-model="form.brandQuotationName"
...@@ -43,53 +42,17 @@ ...@@ -43,53 +42,17 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="6" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="总金额" prop="amount"> <el-form-item label="总金额" prop="amount">
<el-input-money <el-input-money
v-model="form.amount" v-model="form.amount"
v-bind:disabled="form.brandQuotationId==0" v-bind:disabled="form.brandQuotationId == 0"
placeholder="新增时不可输入,请修改时操作"/> placeholder="新增时不可输入,请修改时操作"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="6">
<el-form-item label="品牌" prop="brandCode">
<el-input v-model="form.brandName" readonly="readonly">
<el-button
slot="append"
icon="el-icon-search"
@click="handleBrandSelect"
placeholder="请选择品牌"
></el-button>
</el-input>
</el-form-item>
<BrandSelect
ref="brSelect"
@onSelected="onBrandSelected"
></BrandSelect>
</el-col> -->
<!-- <el-col :span="6">
<el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" readonly="readonly" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="8">
<el-form-item label="品牌编码" prop="brandCode">
<el-input v-model="form.brandCode" readonly="readonly">
<el-button
slot="append"
icon="el-icon-search"
@click="handleBrandSelect"
:disabled="form.brandContactId"
></el-button>
</el-input>
</el-form-item>
<BrandSelect
ref="brSelect"
@onSelected="onBrandSelected"
></BrandSelect>
</el-col> -->
<el-col :md="6" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="产品" prop="itemId"> <el-form-item label="产品" prop="itemId">
<el-input <el-input
v-model="form.itemName" v-model="form.itemName"
...@@ -106,13 +69,17 @@ ...@@ -106,13 +69,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="品牌名称" prop="brandName"> <el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" placeholder="请先将所选产品绑定品牌" disabled/> <el-input
</el-form-item> v-model="form.brandName"
</el-col> placeholder="请先将所选产品绑定品牌"
disabled
/>
</el-form-item>
</el-col>
<el-col :md="6" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="工艺路线" prop="routeId"> <el-form-item label="工艺路线" prop="routeId">
<el-input <el-input
v-model="form.routeName" v-model="form.routeName"
...@@ -133,7 +100,7 @@ ...@@ -133,7 +100,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :md="24" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
type="textarea" type="textarea"
...@@ -174,10 +141,22 @@ import { ...@@ -174,10 +141,22 @@ import {
// 导入品牌选择框 // 导入品牌选择框
import BrandSelect from "@/components/brandSelect/single.vue"; import BrandSelect from "@/components/brandSelect/single.vue";
//导入品牌报价js //导入品牌报价js
import { listBrandQuotation, getBrandQuotation, delBrandQuotation, addBrandQuotation, updateBrandQuotation } from "@/api/mes/dv/brandquotation"; import {
listBrandQuotation,
getBrandQuotation,
delBrandQuotation,
addBrandQuotation,
updateBrandQuotation,
} from "@/api/mes/dv/brandquotation";
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect, BrandSelect }, components: {
ProogingBom,
ProogingProcess,
ItemSelect,
RoutesProcessSelect,
BrandSelect,
},
dicts: [], dicts: [],
provide() { provide() {
return { return {
...@@ -205,9 +184,13 @@ export default { ...@@ -205,9 +184,13 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
brandId: [ brandId: [
{ required: true, message: "品牌不能为空,请先查验所选产品是否已绑定品牌", trigger: "blur" } {
], required: true,
} message: "品牌不能为空,请先查验所选产品是否已绑定品牌",
trigger: "blur",
},
],
},
}; };
}, },
computed: { computed: {
...@@ -229,11 +212,11 @@ export default { ...@@ -229,11 +212,11 @@ export default {
created() { created() {
this.getFormInfo(); this.getFormInfo();
if (this.mode == "apply") { if (this.mode == "apply") {
this.gCode(); this.gCode();
} }
}, },
methods: { methods: {
//选择品牌 //选择品牌
handleBrandSelect() { handleBrandSelect() {
this.$refs.brSelect.showFlag = true; this.$refs.brSelect.showFlag = true;
}, },
...@@ -322,8 +305,11 @@ export default { ...@@ -322,8 +305,11 @@ export default {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
// 关闭页签 this.$nextTick(() => {
tabPlugins.closeOpenPage(); // 关闭页签
tabPlugins.closeOpenPage();
this.$router.replace({ path: "/mes/dv/brandquotation/query" });
});
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
v-if="mode != 'info'" v-if="mode != 'info'"
label="操作" label="操作"
align="center" align="center"
width="150" width="300"
fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetProd(row, $index)" @click="openSetProd(row, $index)"
> >
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="updateRow(row, $index)" @click="updateRow(row, $index)"
>修改</el-button >修改</el-button
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="订单编号" prop="orderNo"> <el-form-item label="订单编号" prop="orderNo">
<el-input <el-input
v-model="queryParams.orderNo" v-model="queryParams.orderNo"
...@@ -10,16 +17,30 @@ ...@@ -10,16 +17,30 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户" prop="clientId"> <el-form-item label="客户" prop="clientId">
<el-select v-model="queryParams.clientId" placeholder="请选择客户" clearable filterable remote :remote-method="getClientList"> <el-select
<el-option v-for="item in clientList" :key="item.clientId" :value="item.clientId" :label="item.clientName"/> 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-select>
</el-form-item> </el-form-item>
<el-form-item label="交货日期" prop="deliveryDate"> <el-form-item label="交货日期" prop="deliveryDate">
<el-date-picker clearable <el-date-picker
v-model="queryParams.deliveryDate" clearable
type="date" v-model="queryParams.deliveryDate"
value-format="yyyy-MM-dd" type="date"
placeholder="请选择交货日期"> value-format="yyyy-MM-dd"
placeholder="请选择交货日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state">
...@@ -39,8 +60,16 @@ ...@@ -39,8 +60,16 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
</el-form> </el-form>
...@@ -53,39 +82,81 @@ ...@@ -53,39 +82,81 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['md:purchaseOrder:export']" v-hasPermi="['md:purchaseOrder:export']"
>导出</el-button> >导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="55" /> v-loading="loading"
<el-table-column label="订单编号" prop="orderNo" /> :data="orderList"
<el-table-column label="客户编号" prop="clientNo" /> @selection-change="handleSelectionChange"
<el-table-column label="客户名称" prop="clientName" /> >
<!-- <el-table-column type="selection" width="55" /> -->
<el-table-column label="订单编号" prop="orderNo" width="160" />
<el-table-column label="客户编号" prop="clientNo" width="120" />
<el-table-column
label="客户名称"
prop="clientName"
width="240"
show-overflow-tooltip
/>
<el-table-column label="交货日期" prop="deliveryDate" width="180"> <el-table-column label="交货日期" prop="deliveryDate" width="180">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<span>{{ parseTime(row.deliveryDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(row.deliveryDate, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark" /> <el-table-column label="备注" prop="remark" min-width="200" />
<el-table-column label="订单状态" prop="state"> <el-table-column label="订单状态" prop="state" width="100">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{ dict.type.sales_order_state.find(item => item.value == row.state).label }} {{
dict.type.sales_order_state.find((item) => item.value == row.state)
.label
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="来源文件" prop="source" /> <el-table-column
<el-table-column label="操作" class-name="small-padding fixed-width" width="200"> label="来源文件"
<template slot-scope="{row}"> prop="source"
<el-button v-hasPermi="['md:order:query']" size="mini" type="text" icon="el-icon-search" @click="onShowDetail(row)">查看</el-button> width="300"
<el-button v-hasPermi="['md:order:edit']" size="mini" type="text" icon="el-icon-edit" @click="toSalesEdit(row)">生成订单</el-button> show-overflow-tooltip
<el-button v-hasPermi="['md:order:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button> />
<el-table-column label="操作" width="200" fixed="right">
<template slot-scope="{ row }">
<el-button
v-hasPermi="['md:order:query']"
size="mini"
type="text"
icon="el-icon-search"
@click="onShowDetail(row)"
>查看</el-button
>
<el-button
v-hasPermi="['md:order:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="toSalesEdit(row)"
>生成订单</el-button
>
<el-button
v-hasPermi="['md:order:remove']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
...@@ -94,43 +165,132 @@ ...@@ -94,43 +165,132 @@
<el-dialog :visible.sync="showDetail" title="采订单详情" width="1200px"> <el-dialog :visible.sync="showDetail" title="采订单详情" width="1200px">
<el-table :data="detailList" max-height="600" size="mini"> <el-table :data="detailList" max-height="600" size="mini">
<el-table-column label="产品名称" prop="itemName" show-overflow-tooltip width="120"/> <el-table-column
<el-table-column label="客户单号" prop="poOrderNo" show-overflow-tooltip/> label="产品名称"
<el-table-column label="客户产品代码" prop="poProductName" show-overflow-tooltip/> prop="itemName"
<el-table-column label="客户产品名称" prop="poProductNo" show-overflow-tooltip/> show-overflow-tooltip
<el-table-column label="宝绅内部品名" prop="productName" show-overflow-tooltip/> width="300"
<el-table-column label="客户单位" prop="customerUnit" show-overflow-tooltip/> />
<el-table-column label="指令号" prop="cmdNo" show-overflow-tooltip/> <el-table-column
<el-table-column label="型体号" prop="featureNo" show-overflow-tooltip/> label="客户单号"
<el-table-column label="配色号" prop="poColorNo" show-overflow-tooltip/> prop="poOrderNo"
<el-table-column label="客户颜色" prop="poColor" show-overflow-tooltip/> width="140"
<el-table-column label="客户单重" prop="poKg" show-overflow-tooltip/> show-overflow-tooltip
<el-table-column label="销线" prop="salePath" show-overflow-tooltip/> />
<el-table-column label="段别" prop="segment" show-overflow-tooltip/> <el-table-column
<el-table-column label="版面" prop="layout" show-overflow-tooltip/> label="客户产品代码"
<el-table-column label="季度" prop="quarter" show-overflow-tooltip/> width="140"
<el-table-column label="整/半码" prop="wholeYard" show-overflow-tooltip/> prop="poProductName"
<el-table-column label="特殊SIZE" prop="specialSize" show-overflow-tooltip/> show-overflow-tooltip
<el-table-column label="PO号" prop="poNo" show-overflow-tooltip/> />
<el-table-column label="WIP号" prop="wipNo" show-overflow-tooltip/> <el-table-column
<el-table-column label="装箱数" prop="packingNum" show-overflow-tooltip/> label="客户产品名称"
<el-table-column label="产地" prop="region" show-overflow-tooltip/> prop="poProductNo"
<el-table-column label="周期" prop="cycle" show-overflow-tooltip/> width="140"
<el-table-column label="SK编号" prop="skNo" show-overflow-tooltip/> show-overflow-tooltip
<el-table-column label="专利号" prop="patentNo" show-overflow-tooltip/> />
<el-table-column label="材质描述" prop="materialDesc" show-overflow-tooltip/> <el-table-column
<el-table-column label="签收人" prop="" show-overflow-tooltip/> label="宝绅内部品名"
<el-table-column label="shipToId" prop="shipToId" show-overflow-tooltip/> prop="productName"
<el-table-column label="交货日期" prop="deliveryDate" show-overflow-tooltip/> width="140"
<el-table-column label="备注" prop="remark" show-overflow-tooltip/> show-overflow-tooltip
<el-table-column label="尺码组" prop="sizeGroup" show-overflow-tooltip/> />
<el-table-column label="尺码" prop="size" show-overflow-tooltip/> <el-table-column
<el-table-column label="订单量" prop="orderNum" show-overflow-tooltip/> label="客户单位"
<el-table-column label="条码" prop="barCode" show-overflow-tooltip/> prop="customerUnit"
<el-table-column label="印刷方向" prop="printingDirection" show-overflow-tooltip/> width="120"
<el-table-column label="产品规格" prop="productSize" show-overflow-tooltip/> show-overflow-tooltip
/>
<el-table-column
label="指令号"
width="120"
prop="cmdNo"
show-overflow-tooltip
/>
<el-table-column
label="型体号"
prop="featureNo"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="配色号"
prop="poColorNo"
show-overflow-tooltip
/>
<el-table-column
label="客户颜色"
prop="poColor"
show-overflow-tooltip
/>
<el-table-column label="客户单重" prop="poKg" show-overflow-tooltip />
<el-table-column label="销线" prop="salePath" show-overflow-tooltip />
<el-table-column label="段别" prop="segment" show-overflow-tooltip />
<el-table-column label="版面" prop="layout" show-overflow-tooltip />
<el-table-column label="季度" prop="quarter" show-overflow-tooltip />
<el-table-column
label="整/半码"
prop="wholeYard"
show-overflow-tooltip
/>
<el-table-column
label="特殊SIZE"
prop="specialSize"
show-overflow-tooltip
/>
<el-table-column label="PO号" prop="poNo" show-overflow-tooltip />
<el-table-column label="WIP号" prop="wipNo" show-overflow-tooltip />
<el-table-column
label="装箱数"
prop="packingNum"
show-overflow-tooltip
/>
<el-table-column label="产地" prop="region" show-overflow-tooltip />
<el-table-column label="周期" prop="cycle" show-overflow-tooltip />
<el-table-column
width="120"
label="SK编号"
prop="skNo"
show-overflow-tooltip
/>
<el-table-column label="专利号" prop="patentNo" show-overflow-tooltip />
<el-table-column
label="材质描述"
prop="materialDesc"
show-overflow-tooltip
/>
<el-table-column label="签收人" prop="" show-overflow-tooltip />
<el-table-column
label="shipToId"
prop="shipToId"
show-overflow-tooltip
/>
<el-table-column
label="交货日期"
prop="deliveryDate"
show-overflow-tooltip
/>
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<el-table-column
label="尺码组"
prop="sizeGroup"
show-overflow-tooltip
/>
<el-table-column label="尺码" prop="size" show-overflow-tooltip />
<el-table-column label="订单量" prop="orderNum" show-overflow-tooltip />
<el-table-column label="条码" prop="barCode" show-overflow-tooltip />
<el-table-column
label="印刷方向"
prop="printingDirection"
show-overflow-tooltip
/>
<el-table-column
label="产品规格"
prop="productSize"
show-overflow-tooltip
/>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-button type="text" @click="onShowSpec(row)">特性值</el-button> <el-button type="text" @click="onShowSpec(row)">特性值</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -140,12 +300,16 @@ ...@@ -140,12 +300,16 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="showSpec" title="采购详情产品特性值" width="650px"> <el-dialog
:visible.sync="showSpec"
title="采购详情产品特性值"
width="650px"
>
<el-form label-width="100px"> <el-form label-width="100px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12" v-for="spec in specList" :key="spec.specKey"> <el-col :span="12" v-for="spec in specList" :key="spec.specKey">
<el-form-item :label="spec.specKey"> <el-form-item :label="spec.specKey">
<el-input v-model="spec.specVal" readonly/> <el-input v-model="spec.specVal" readonly />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -159,13 +323,13 @@ ...@@ -159,13 +323,13 @@
</template> </template>
<script> <script>
import { delOrder, listOrder } from '@/api/mes/od/purchaseOrder' import { delOrder, listOrder } from "@/api/mes/od/purchaseOrder";
import { listDetail } from '@/api/mes/od/purchaseOrderDetail' import { listDetail } from "@/api/mes/od/purchaseOrderDetail";
import { listClient } from '@/api/mes/md/client' import { listClient } from "@/api/mes/md/client";
export default { export default {
name: "PurchaseOrder", name: "PurchaseOrder",
dicts: ['mes_client_type','sys_yes_no', 'sales_order_state'], dicts: ["mes_client_type", "sys_yes_no", "sales_order_state"],
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -192,26 +356,32 @@ export default { ...@@ -192,26 +356,32 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderNo: null, clientId: null, deliveryDate: null, state: null, source: null orderNo: null,
clientId: null,
deliveryDate: null,
state: null,
source: null,
}, },
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getClientList() this.getClientList();
}, },
methods: { methods: {
/** 查询客户采购订单列表 */ /** 查询客户采购订单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listOrder(this.queryParams).then(response => { listOrder(this.queryParams).then((response) => {
this.orderList = response.rows; this.orderList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
getClientList(key) { getClientList(key) {
listClient({ clientName: key, pageNum: 1, pageSize: 100 }).then(res => this.clientList = res.rows) listClient({ clientName: key, pageNum: 1, pageSize: 100 }).then(
(res) => (this.clientList = res.rows)
);
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -225,40 +395,49 @@ export default { ...@@ -225,40 +395,49 @@ export default {
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
toSalesEdit(row) { toSalesEdit(row) {
if (row.state != 0) return this.$message.error("该采购单单已生成销售订单") if (row.state != 0)
let id = row ? row.id : this.ids[0] return this.$message.error("该采购单单已生成销售订单");
this.$router.push('/order/sales/detail?purchaseId=' + id) let id = row ? row.id : this.ids[0];
this.$router.push("/order/sales/detail?purchaseId=" + id);
}, },
onShowDetail(row) { onShowDetail(row) {
let id = row ? row.id : this.ids[0] let id = row ? row.id : this.ids[0];
this.showDetail = true this.showDetail = true;
listDetail({orderId: id}).then(res => this.detailList = res.rows) listDetail({ orderId: id }).then((res) => (this.detailList = res.rows));
}, },
onShowSpec(row) { onShowSpec(row) {
this.showSpec = true this.showSpec = true;
this.specList = JSON.parse(row.specJson) this.specList = JSON.parse(row.specJson);
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除客户采购订单编号为"' + ids + '"的数据项?').then(function() { this.$modal
return delOrder(ids); .confirm('是否确认删除客户采购订单编号为"' + ids + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delOrder(ids);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => {}); .then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('md/order/export', { this.download(
...this.queryParams "md/order/export",
}, `order_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`order_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
v-if="mode != 'info'" v-if="mode != 'info'"
label="操作" label="操作"
align="center" align="center"
width="150" width="300"
fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetProd(row, $index)" @click="openSetProd(row, $index)"
> >
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetQrindex(row, $index)" @click="openSetQrindex(row, $index)"
> >
...@@ -36,7 +35,6 @@ ...@@ -36,7 +35,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetTool(row, $index)" @click="openSetTool(row, $index)"
> >
...@@ -44,7 +42,6 @@ ...@@ -44,7 +42,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="updateRow(row, $index)" @click="updateRow(row, $index)"
>修改</el-button >修改</el-button
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:pro:productionRequest:add']" v-hasPermi="['mes:pro:productionRequest:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['mes:pro:productionRequest:edit']" v-hasPermi="['mes:pro:productionRequest:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['mes:pro:productionRequest:remove']" v-hasPermi="['mes:pro:productionRequest:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['mes:pro:productionRequest:export']" v-hasPermi="['mes:pro:productionRequest:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
<right-toolbar <right-toolbar
...@@ -120,14 +120,18 @@ ...@@ -120,14 +120,18 @@
row-key="productionRequestId" row-key="productionRequestId"
default-expand-all default-expand-all
> >
<el-table-column label="量产申请单编码" prop="productionRequestCode"> <el-table-column
label="申请单编码"
width="120"
prop="productionRequestCode"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="handleView(scope.row)" @click="handleView(scope.row)"
v-hasPermi="['mes:pro:productionRequest:query']" v-hasPermi="['mes:pro:productionRequest:query']"
>{{ scope.row.productionRequestCode }}</el-button >{{ scope.row.productionRequestCode }}</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
...@@ -168,25 +172,43 @@ ...@@ -168,25 +172,43 @@
label="是否要鞋图" label="是否要鞋图"
align="center" align="center"
prop="isNeedShoeImg" prop="isNeedShoeImg"
width="100"
:formatter="yesNoFmt" :formatter="yesNoFmt"
/> />
<el-table-column <el-table-column
label="是否附样品" label="是否附样品"
align="center" align="center"
width="100"
prop="isNeedPrototype" prop="isNeedPrototype"
:formatter="yesNoFmt" :formatter="yesNoFmt"
/> />
<el-table-column label="唯一码产品" align="center" prop="isUniqueCode" <el-table-column
:formatter="yesNoFmt"/> label="唯一码产品"
<el-table-column label="不考虑型体配色" align="center" prop="isConsiderColor" align="center"
:formatter="yesNoFmt"/> width="100"
<el-table-column label="是否禁用" align="center" prop="isDisabled" prop="isUniqueCode"
:formatter="yesNoFmt"/> :formatter="yesNoFmt"
/>
<el-table-column
label="不考虑型体配色"
align="center"
width="130"
prop="isConsiderColor"
:formatter="yesNoFmt"
/>
<el-table-column
label="是否禁用"
align="center"
width="80"
prop="isDisabled"
:formatter="yesNoFmt"
/>
/> />
<el-table-column <el-table-column
label="申请单状态" label="申请单状态"
align="center" align="center"
width="100"
prop="prototypeRequestStatus" prop="prototypeRequestStatus"
> >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -200,6 +222,7 @@ ...@@ -200,6 +222,7 @@
label="操作" label="操作"
width="200px" width="200px"
align="center" align="center"
fixed="right"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -210,7 +233,7 @@ ...@@ -210,7 +233,7 @@
v-if="scope.row.productionRequestStatus == '0'" v-if="scope.row.productionRequestStatus == '0'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:productionRequest:edit']" v-hasPermi="['mes:pro:productionRequest:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
size="mini" size="mini"
...@@ -219,15 +242,7 @@ ...@@ -219,15 +242,7 @@
v-if="scope.row.productionRequestStatus == '0'" v-if="scope.row.productionRequestStatus == '0'"
@click="handleFinish(scope.row)" @click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:productionRequest:update']" v-hasPermi="['mes:pro:productionRequest:update']"
>通过</el-button >通过</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:productionRequest:remove']"
>删除</el-button
> >
<el-button <el-button
size="mini" size="mini"
...@@ -236,7 +251,15 @@ ...@@ -236,7 +251,15 @@
v-if="scope.row.productionRequestStatus == '1'" v-if="scope.row.productionRequestStatus == '1'"
@click="generate(scope.row)" @click="generate(scope.row)"
v-hasPermi="['mes:pro:productionRequest:edit']" v-hasPermi="['mes:pro:productionRequest:edit']"
>生成制作单</el-button >生成制作单</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:productionRequest:remove']"
>删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
...@@ -252,250 +275,255 @@ ...@@ -252,250 +275,255 @@
</template> </template>
<script> <script>
import { import {
listProductionRequest, listProductionRequest,
getProductionRequest, getProductionRequest,
delProductionRequest, delProductionRequest,
addProductionRequest, addProductionRequest,
updateProductionRequest, updateProductionRequest,
dofinish, dofinish,
} from "@/api/mes/pro/productionRequest"; } from "@/api/mes/pro/productionRequest";
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
import ClientSelect from "@/components/clientSelect/single.vue"; import ClientSelect from "@/components/clientSelect/single.vue";
import VendorSelect from "@/components/vendorSelect/single.vue"; import VendorSelect from "@/components/vendorSelect/single.vue";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "ProductionRequest", name: "ProductionRequest",
dicts: [ dicts: [
"sys_yes_no", "sys_yes_no",
"mes_productionreq_status", "mes_productionreq_status",
"mes_productionRequest_sourcetype", "mes_productionRequest_sourcetype",
"mes_productionRequest_type", "mes_productionRequest_type",
], ],
components: { components: {
Treeselect, Treeselect,
ItemSelect, ItemSelect,
ClientSelect, ClientSelect,
VendorSelect, VendorSelect,
}, },
data() { data() {
return { return {
//自动生成编码 //自动生成编码
autoGenFlag: false, autoGenFlag: false,
optType: undefined, optType: undefined,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 总条数 // 总条数
total: 0, total: 0,
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 生产工单表格数据 // 生产工单表格数据
productionRequestList: [], productionRequestList: [],
// 生产工单树选项 // 生产工单树选项
productionRequestOptions: [], productionRequestOptions: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
itemName: null, // 可以查简称与英文名 itemName: null, // 可以查简称与英文名
productionRequestStatus: null, productionRequestStatus: null,
}, },
options: [ options: [
{ value: 0, label: "审批中" }, { value: 0, label: "审批中" },
{ value: 1, label: "待制作" }, { value: 1, label: "待制作" },
{ value: 2, label: "量产中" }, { value: 2, label: "量产中" },
{ value: 3, label: "待质检" }, { value: 3, label: "待质检" },
{ value: 4, label: "待确认" }, { value: 4, label: "待确认" },
{ value: 5, label: "已完成" }, { value: 5, label: "已完成" },
], ],
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
// productionRequestCode: [ // productionRequestCode: [
// { required: true, message: "工单编码不能为空", trigger: "blur" } // { required: true, message: "工单编码不能为空", trigger: "blur" }
// ], // ],
}, },
};
},
created() {
this.getList();
},
methods: {
/** 查询生产工单列表 */
getList() {
this.loading = true;
listProductionRequest(this.queryParams).then((response) => {
this.productionRequestList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
productionRequestId: null,
productionRequestCode: null,
itemId: null,
itemName: null,
routeId: null,
routeName: null,
abbreviation: null,
enName: null,
num: null,
type: null,
modality: null,
surfaceTreatment: null,
ngReason: null,
plannedFinishDate: null,
plannedLayoutDate: null,
productionRequestStatus: "0",
testStandard: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form");
}, },
created() { /** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
methods: { /** 重置按钮操作 */
/** 查询生产工单列表 */ resetQuery() {
getList() { this.resetForm("queryForm");
this.loading = true; this.handleQuery();
listProductionRequest(this.queryParams).then((response) => { },
this.productionRequestList = response.rows; /** 新增按钮操作 */
this.total = response.total; handleAdd(row) {
this.loading = false; // 跳转到申请单界面
}); this.$router.push("/mes/pro/productiorequest/apply");
}, return;
// 取消按钮 // this.reset();
cancel() { // this.getTreeselect();
this.open = false; // if (row != null && row.productionRequestId) {
this.reset(); // this.form.parentId = row.productionRequestId;
}, // this.form.orderSource = row.orderSource;
// 表单重置 // this.form.sourceCode = row.sourceCode;
reset() { // this.form.clientId = row.clientId;
this.form = { // this.form.clientCode = row.clientCode;
productionRequestId: null, // this.form.clientName = row.clientName;
productionRequestCode: null, // } else {
itemId: null, // this.form.parentId = 0;
itemName: null, // }
routeId: null, // this.open = true;
routeName: null, },
abbreviation: null, // 查询明细按钮操作
enName: null, handleView(row) {
num: null, this.reset();
type: null, const productionRequestId = row.productionRequestId || this.ids;
modality: null, this.$router.push(
surfaceTreatment: null, "/mes/pro/productiorequest/info?productionRequestId=" +
ngReason: null, productionRequestId
plannedFinishDate: null, );
plannedLayoutDate: null, // getproductionRequest(productionRequestId).then((response) => {
productionRequestStatus: "0", // this.form = response.data;
testStandard: null, // this.open = true;
remark: null, // this.title = "查看工单信息";
createBy: null, // this.optType = "view";
createTime: null, // });
updateBy: null, },
updateTime: null, /** 修改按钮操作 */
}; handleUpdate(row) {
this.resetForm("form"); this.reset();
}, const productionRequestId = row.productionRequestId || this.ids;
/** 搜索按钮操作 */ this.$router.push(
handleQuery() { "/mes/pro/productiorequest/edit?productionRequestId=" +
this.queryParams.pageNum = 1; productionRequestId
this.getList(); );
}, // getProductionRequest(productionRequestId).then((response) => {
/** 重置按钮操作 */ // // this.form = response.data;
resetQuery() { // // this.open = true;
this.resetForm("queryForm"); // // this.title = "修改生产工单";
this.handleQuery(); // // this.optType="edit";
}, // // 跳转修改
/** 新增按钮操作 */ // });
handleAdd(row) { },
// 跳转到申请单界面 /** 删除按钮操作 */
this.$router.push("/mes/pro/productiorequest/apply"); handleDelete(row) {
return; this.$modal
// this.reset(); .confirm(
// this.getTreeselect(); '是否确认删除编号为"' + row.productionRequestId + '"的量产单?'
// if (row != null && row.productionRequestId) { )
// this.form.parentId = row.productionRequestId; .then(function () {
// this.form.orderSource = row.orderSource; return delProductionRequest(row.productionRequestId);
// this.form.sourceCode = row.sourceCode; })
// this.form.clientId = row.clientId; .then(() => {
// this.form.clientCode = row.clientCode; this.getList();
// this.form.clientName = row.clientName; this.$modal.msgSuccess("删除成功");
// } else { })
// this.form.parentId = 0; .catch(() => {});
// } },
// this.open = true;
},
// 查询明细按钮操作
handleView(row) {
this.reset();
const productionRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productiorequest/info?productionRequestId=" + productionRequestId
);
// getproductionRequest(productionRequestId).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = "查看工单信息";
// this.optType = "view";
// });
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const productionRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productiorequest/edit?productionRequestId=" + productionRequestId
);
// getProductionRequest(productionRequestId).then((response) => {
// // this.form = response.data;
// // this.open = true;
// // this.title = "修改生产工单";
// // this.optType="edit";
// // 跳转修改
// });
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm('是否确认删除编号为"' + row.productionRequestId + '"的量产单?')
.then(function () {
return delProductionRequest(row.productionRequestId);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
handleSelectProduct() { handleSelectProduct() {
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.showFlag = true;
}, },
handleSelectClient() { handleSelectClient() {
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.showFlag = true;
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
"mes/pro/productionRequest/export", "mes/pro/productionRequest/export",
{ {
...this.queryParams, ...this.queryParams,
}, },
`量产申请单_${new Date().getTime()}.xlsx` `量产申请单_${new Date().getTime()}.xlsx`
); );
}, },
// 审批 // 审批
handleFinish(row) { handleFinish(row) {
row.productionRequestStatus = 1 row.productionRequestStatus = 1;
this.$modal this.$modal
.confirm("确认通过样品申请单?一旦完成,此工单将无法继续修改") .confirm("确认通过样品申请单?一旦完成,此工单将无法继续修改")
.then(function () { .then(function () {
return dofinish(row); //完成申请单审批 return dofinish(row); //完成申请单审批
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("审批成功"); this.$modal.msgSuccess("审批成功");
}) })
.catch(() => {}); .catch(() => {});
}, },
yesNoFmt(row, column, cellValue){ yesNoFmt(row, column, cellValue) {
if(cellValue==1){ if (cellValue == 1) {
return '是'; return "是";
}else{ } else {
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>
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
v-if="mode != 'info'" v-if="mode != 'info'"
label="操作" label="操作"
align="center" align="center"
width="150" width="300"
fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetProd(row, $index)" @click="openSetProd(row, $index)"
> >
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetQrindex(row, $index)" @click="openSetQrindex(row, $index)"
> >
...@@ -36,7 +35,6 @@ ...@@ -36,7 +35,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetTool(row, $index)" @click="openSetTool(row, $index)"
> >
...@@ -44,7 +42,6 @@ ...@@ -44,7 +42,6 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="updateRow(row, $index)" @click="updateRow(row, $index)"
>修改</el-button >修改</el-button
...@@ -59,7 +56,6 @@ ...@@ -59,7 +56,6 @@
ref="ProcessProdRef" ref="ProcessProdRef"
@updateItem="updateItem" @updateItem="updateItem"
/> />
/>
<ProcessQcindex <ProcessQcindex
:process="currentRow" :process="currentRow"
ref="ProcessQcindexRef" ref="ProcessQcindexRef"
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<!-- <el-form-item label="工单编码" prop="workorderCode"> <!-- <el-form-item label="工单编码" prop="workorderCode">
<el-input <el-input
v-model="queryParams.workorderCode" v-model="queryParams.workorderCode"
...@@ -172,7 +179,8 @@ ...@@ -172,7 +179,8 @@
size="mini" size="mini"
@click="handleImport" @click="handleImport"
v-hasPermi="['mes:pro:workorder:edit']" v-hasPermi="['mes:pro:workorder:edit']"
>导入工单</el-button> >导入工单</el-button
>
</el-col> </el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
...@@ -180,7 +188,6 @@ ...@@ -180,7 +188,6 @@
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<!-- 用户导入对话框 --> <!-- 用户导入对话框 -->
<el-dialog title="导入工单" :visible.sync="upload.open" width="400px"> <el-dialog title="导入工单" :visible.sync="upload.open" width="400px">
<el-upload <el-upload
...@@ -199,7 +206,13 @@ ...@@ -199,7 +206,13 @@
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip"> <div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xls、xlsx格式文件。</span> <span>仅允许导入xls、xlsx格式文件。</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link> <el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div> </div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -254,9 +267,10 @@ ...@@ -254,9 +267,10 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="工艺名称" label="工艺名称"
width="140" width="160"
align="center" align="center"
prop="routeName" prop="routeName"
show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="订单编号" label="订单编号"
...@@ -338,15 +352,17 @@ ...@@ -338,15 +352,17 @@
v-if="scope.row.status == 'PREPARE'" v-if="scope.row.status == 'PREPARE'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:workorder:edit']" v-hasPermi="['mes:pro:workorder:edit']"
>修改</el-button> >修改</el-button
<el-button >
<el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
v-if="scope.row.status == 'PREPARE'" v-if="scope.row.status == 'PREPARE'"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:workorder:remove']" v-hasPermi="['mes:pro:workorder:remove']"
>删除</el-button> >删除</el-button
>
<!-- <el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -368,7 +384,7 @@ ...@@ -368,7 +384,7 @@
v-hasPermi="['mes:pro:workorder:update']" v-hasPermi="['mes:pro:workorder:update']"
>完成</el-button >完成</el-button
> --> > -->
<!-- <el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -679,7 +695,7 @@ import VendorSelect from "@/components/vendorSelect/single.vue"; ...@@ -679,7 +695,7 @@ import VendorSelect from "@/components/vendorSelect/single.vue";
import { genCode } from "@/api/system/autocode/rule"; import { genCode } from "@/api/system/autocode/rule";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from '@/utils/auth' import { getToken } from "@/utils/auth";
export default { export default {
name: "Workorder", name: "Workorder",
...@@ -728,7 +744,7 @@ export default { ...@@ -728,7 +744,7 @@ export default {
// 设置上传的请求头部 // 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// 上传的地址 // 上传的地址
url: process.env.VUE_APP_BASE_API + "/mes/pro/workorder/importData" url: process.env.VUE_APP_BASE_API + "/mes/pro/workorder/importData",
}, },
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -754,19 +770,19 @@ export default { ...@@ -754,19 +770,19 @@ export default {
requestDate: null, requestDate: null,
parentId: null, parentId: null,
ancestors: null, ancestors: null,
status: 'PREPARE', status: "PREPARE",
}, },
// 表单状态 // 表单状态
options: [ options: [
{ value: "PREPARE", label: "待确认" }, { value: "PREPARE", label: "待确认" },
{ value: "CONFIRMED", label: "已确认" }, { value: "CONFIRMED", label: "已确认" },
{ value: "APPROVING", label: "审批中" }, { value: "APPROVING", label: "审批中" },
{ value: "APPROVED", label: "已审批" }, { value: "APPROVED", label: "已审批" },
{ value: "FINISHED", label: "已完成" }, { value: "FINISHED", label: "已完成" },
{ value: "TASKGENERATED", label: "已生成任务单" }, { value: "TASKGENERATED", label: "已生成任务单" },
{ value: "ISSUEGENERATED", label: "已生成领料单" }, { value: "ISSUEGENERATED", label: "已生成领料单" },
{ value: "PRODUCIONG", label: "生产中" }, { value: "PRODUCIONG", label: "生产中" },
], ],
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -819,8 +835,11 @@ export default { ...@@ -819,8 +835,11 @@ export default {
}); });
}, },
importTemplate() { importTemplate() {
this.download('mes/pro/workorder/importTemplate', { this.download(
}, `work_order_template_${new Date().getTime()}.xlsx`) "mes/pro/workorder/importTemplate",
{},
`work_order_template_${new Date().getTime()}.xlsx`
);
}, },
/** 导入按钮操作 */ /** 导入按钮操作 */
handleImport() { handleImport() {
...@@ -835,7 +854,13 @@ export default { ...@@ -835,7 +854,13 @@ export default {
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList(); this.getList();
}, },
// 提交上传文件 // 提交上传文件
...@@ -1123,12 +1148,18 @@ export default { ...@@ -1123,12 +1148,18 @@ export default {
}, },
/** 完成任务单操作 */ /** 完成任务单操作 */
confirmWorkorder(row) { confirmWorkorder(row) {
this.$modal.confirm('是否将工单编号"' + row.workorderCode + '"的草稿数据项改为已确认?').then(function() { this.$modal
return confirmedWorkorder(row.workorderId); .confirm(
}).then(() => { '是否将工单编号"' + row.workorderCode + '"的草稿数据项改为已确认?'
this.getList(); )
this.$modal.msgSuccess("已确认成功"); .then(function () {
}).catch(() => {}); return confirmedWorkorder(row.workorderId);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("已确认成功");
})
.catch(() => {});
}, },
//自动生成编码 //自动生成编码
handleAutoGenChange(autoGenFlag) { handleAutoGenChange(autoGenFlag) {
......
...@@ -85,27 +85,27 @@ ...@@ -85,27 +85,27 @@
<el-table v-loading="loading" :data="factoryQuoteList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="factoryQuoteList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<el-table-column label="客户编号" prop="clientCode"/> <el-table-column label="客户编号" width="120" prop="clientCode"/>
<el-table-column label="客户名称" prop="clientName"/> <el-table-column label="客户名称" width="180" prop="clientName"/>
<el-table-column label="产品编号" prop="itemCode"/> <el-table-column label="产品编号" width="160" prop="itemCode"/>
<el-table-column label="产品名称" prop="itemName"/> <el-table-column label="产品名称" min-width="200" show-overflow-tooltip prop="itemName"/>
<el-table-column label="价格" prop="price"/> <el-table-column label="价格" width="100" prop="price"/>
<el-table-column label="有效期起" prop="validFrom" width="180"> <el-table-column label="有效期起" prop="validFrom" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.validFrom, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.validFrom, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效期至" prop="validTo" width="180"> <el-table-column label="有效期至" prop="validTo" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.validTo, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.validTo, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="state"> <el-table-column label="状态" prop="state" width="100">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{ row.state === '0' ? '草稿' : row.state === '1' ? '审批中' : row.state === '2' ? '发布中' : '已发布'}} {{ row.state === '0' ? '草稿' : row.state === '1' ? '审批中' : row.state === '2' ? '发布中' : '已发布'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width"> <el-table-column width="120" fixed="right" label="操作" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.state === '0' || scope.row.state === '2'" v-if="scope.row.state === '0' || scope.row.state === '2'"
......
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