成品工艺+产品编码

master
zhaoxiaolin 1 year ago
parent 555bce6e5d
commit d1162e6acc

@ -85,7 +85,7 @@
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
type="success"
plain
icon="el-icon-download"
size="mini"
@ -96,7 +96,7 @@
</el-col>
<el-col :span="1.5">
<el-button
type="info"
type="primary"
plain
icon="el-icon-upload2"
size="mini"

@ -75,15 +75,16 @@
<!--
<el-col :span="1.5">
<el-button
type="info"
type="primary"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['mes:pro:order:import']"
v-hasPermi="['plan:whiteOrder:import']"
>导入
</el-button>
</el-col>-->
</el-col>
-->
<el-col :span="1.5">
<el-button
type="warning"
@ -91,7 +92,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:order:export']"
v-hasPermi="['plan:whiteOrder:export']"
>导出
</el-button>
</el-col>
@ -490,7 +491,37 @@
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">-->
<!-- <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的订单数据-->
<!-- </div>-->
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate">下载模板
</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -503,6 +534,7 @@ import {
addWhiteOrder,
updateWhiteOrder
} from "@/api/plan/whiteOrder";
import {getToken} from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import moment from "moment";
@ -625,7 +657,22 @@ export default {
addrules: {},
/**********************************/
eRouteProps: {multiple: true},
eRouteOptions: []
eRouteOptions: [],
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()},
//
url: process.env.VUE_APP_BASE_API + "/plan/order/importData"
}
};
},
created() {
@ -1004,9 +1051,6 @@ export default {
//
this.splitOpen = true;
},
// -
handleImport() {
},
//
handleExport() {
this.download('/plan/whiteOrder/export', {
@ -1310,6 +1354,31 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
// -
handleImport() {
this.upload.title = "订单信息导入";
this.upload.open = true;
},
// -
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// -
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
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.getList();
},
// -
submitFileForm() {
this.$refs.upload.submit();
},
// -
importTemplate() {
this.download('/plan/whiteOrder/importTemplate', {}, `order_example_template_${new Date().getTime()}.xlsx`)
}
}
};

@ -176,11 +176,11 @@
<el-table-column width="150" label="工艺名称" align="center" prop="routeName"/>
<!-- show-overflow-tooltip -->
<el-table-column width="300" label="产线设备" align="center" >
<template slot-scope="scope">
<el-popover width="250" placement="top-start" trigger="hover" :content="scope.row.prodLineName">
<span slot="reference" class="btn">{{ scope.row.prodLineName }}</span>
</el-popover>
</template>
<template slot-scope="scope">
<el-popover width="250" placement="top-start" trigger="hover" :content="scope.row.prodLineName">
<span slot="reference" class="btn">{{ scope.row.prodLineName }}</span>
</el-popover>
</template>
</el-table-column>
<el-table-column width="130" label="产线设备编码" align="center" prop="prodLineCode" v-if="false"/>
<el-table-column width="120" label="工单生产日期" align="center" prop="productDate">
@ -437,11 +437,11 @@
<el-table-column width="200" align="center" prop="workorderCode" label="工单号"></el-table-column>
<el-table-column width="100" align="center" prop="productDate" label="工单日期"></el-table-column>
<el-table-column width="150" align="center" label="生产线体设备">
<template slot-scope="scope">
<el-popover width="250" placement="top-start" trigger="hover" :content="scope.row.prodLineCode">
<span slot="reference" class="btn">{{ scope.row.prodLineCode }}</span>
</el-popover>
</template>
<template slot-scope="scope">
<el-popover width="250" placement="top-start" trigger="hover" :content="scope.row.prodLineCode">
<span slot="reference" class="btn">{{ scope.row.prodLineCode }}</span>
</el-popover>
</template>
</el-table-column>
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
<el-table-column width="60" label="单位" align="center" prop="unit"/>
@ -667,11 +667,13 @@ export default {
return
}
}
this.loading = true;
const workorderIds = row.workorderCode || this.codes;
this.$modal.confirm('是否确认下发生产工单编号为"' + workorderIds + '"的数据项?').then(function () {
return downWorkorder(workorderIds);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("下发成功");
}).catch(() => {

@ -9,6 +9,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工艺路线名称" prop="routeName">
<el-input
v-model="queryParams.routeName"
@ -108,6 +116,7 @@
>{{scope.row.routeCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="productCode" width="250"/>
<el-table-column label="工艺路线名称" align="center" prop="routeName" width="250"/>
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" width="250"/>
<el-table-column label="工艺路线版本" align="center" prop="routeVersion" width="100"/>
@ -243,7 +252,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="BP/车" prop="carNumUnit">
<el-input v-model="form.carNumUnit" placeholder="请输入每车的数量" type="number"/>
<el-input v-model="form.carNumUnit" placeholder="请输入每车的数量" type="number" min="0"/>
</el-form-item>
</el-col>
</el-row>

Loading…
Cancel
Save