Browse Source

0505更新

master
ruanqi 4 years ago
parent
commit
c6cb9b23a7
  1. 4
      src/api/production/dailyPlan.js
  2. 8
      src/views/modules/common/column.vue
  3. 464
      src/views/modules/production/close_schedule.vue
  4. 28
      src/views/modules/production/labelold.js
  5. 6
      src/views/modules/production/print_serialNo_label.js

4
src/api/production/dailyPlan.js

@ -38,3 +38,7 @@ export const getPartCheckData = data => createAPI('/dailyPlan/getPartCheckData',
// 改变关闭属性 // 改变关闭属性
export const changeScheduleCloseFlag = data => createAPI('/dailyPlan/changeScheduleCloseFlag', 'POST', data) export const changeScheduleCloseFlag = data => createAPI('/dailyPlan/changeScheduleCloseFlag', 'POST', data)
// 日计划流转
export const circulationPlan = data => createAPI('/dailyPlan/circulationPlan', 'POST', data)

8
src/views/modules/common/column.vue

@ -1,7 +1,7 @@
<template> <template>
<el-dialog :close-on-click-modal="false" :show-close="false" :close-on-press-escape="false" title="设置动态列表" <el-dialog :close-on-click-modal="false" :show-close="false" :close-on-press-escape="false" title="设置动态列表"
:visible.sync="visible" :visible.sync="visible"
width="908px" v-drag>
width="750px" v-drag>
<el-form label-position="top" @keyup.enter.native="updateColumnList()" <el-form label-position="top" @keyup.enter.native="updateColumnList()"
v-model="userColumnList" v-model="userColumnList"
inline="inline" inline="inline"
@ -12,7 +12,7 @@
:label="item.columnLabel" :label="item.columnLabel"
:prop="item.columnProp"> :prop="item.columnProp">
<el-form-item label="列顺序"> <el-form-item label="列顺序">
<el-input oninput="value=value.replace(/[^\d]/g, '')" v-model="item.sortLv" :min="0" ></el-input>
<el-input oninput="value=value.replace(/[^\d]/g, '')" v-model="item.sortLv" :min="0" style="width: 80px"></el-input>
<!-- <el-input-number v-model="item.sortLv" controls-position="right" size="mini" :min="0"--> <!-- <el-input-number v-model="item.sortLv" controls-position="right" size="mini" :min="0"-->
<!-- :max="100"></el-input-number>--> <!-- :max="100"></el-input-number>-->
</el-form-item> </el-form-item>
@ -38,7 +38,7 @@
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item label="宽度"> <el-form-item label="宽度">
<el-input oninput="value=value.replace(/[^\d]/g, '')" v-model="item.columnWidth" :min="0" ></el-input>
<el-input oninput="value=value.replace(/[^\d]/g, '')" v-model="item.columnWidth" :min="0" style="width: 80px"></el-input>
<!-- <el-input-number v-model="item.columnWidth" controls-position="right" size="mini" :min="0"--> <!-- <el-input-number v-model="item.columnWidth" controls-position="right" size="mini" :min="0"-->
<!-- :max="1000"></el-input-number>--> <!-- :max="1000"></el-input-number>-->
</el-form-item> </el-form-item>
@ -50,7 +50,7 @@
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="位置"> <el-form-item label="位置">
<el-select v-model="item.align" >
<el-select v-model="item.align" style="width: 80px">
<el-option value="left" label="居左"></el-option> <el-option value="left" label="居左"></el-option>
<el-option value="center" label="居中"></el-option> <el-option value="center" label="居中"></el-option>
<el-option value="right" label="居右"></el-option> <el-option value="right" label="居右"></el-option>

464
src/views/modules/production/close_schedule.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="customer-css">
<div class="mod-config">
<!-- 查询时间和产品 --> <!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'工厂编号:'"> <el-form-item :label="'工厂编号:'">
@ -53,6 +53,8 @@
<el-button type="primary" @click="refreshTables()" class="customer-bun-mid" <el-button type="primary" @click="refreshTables()" class="customer-bun-mid"
style="margin-left: 10px; margin-bottom: 5px;">查询 style="margin-left: 10px; margin-bottom: 5px;">查询
</el-button> </el-button>
<el-button @click="userSetting" type="primary">设置动态列表</el-button>
<el-button @click="saveColumnList()" v-if="this.$store.state.user.name==='xjtest'" type="primary">保存默认动态列</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="'已关闭,已达数量'"> <el-form-item :label="'已关闭,已达数量'">
<el-card class="customer-el-card customer-el-card-pink" style="margin-left:100px"></el-card> <el-card class="customer-el-card customer-el-card-pink" style="margin-left:100px"></el-card>
@ -79,12 +81,13 @@
width="70" width="70"
label="操作"> label="操作">
<template slot-scope="scope" class="foo_container"> <template slot-scope="scope" class="foo_container">
<a v-if="scope.row.closedFlag==='Y'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="openSchedule(scope.row)">开启</a>
<a v-if="scope.row.closedFlag==='N'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="closeSchedule(scope.row)">关闭</a>
<a v-if="scope.row.closedFlag==='N'&&scope.row.printFlag==='N'" type="text" size="small" @click="circulation(scope.row)">流转</a>
<!-- <a v-if="scope.row.closedFlag==='Y'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="openSchedule(scope.row)">开启</a>-->
<!-- <a v-if="scope.row.closedFlag==='N'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="closeSchedule(scope.row)">关闭</a>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columnArray" :key="index"
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
:prop="item.columnProp" :prop="item.columnProp"
:header-align="item.headerAlign" :header-align="item.headerAlign"
@ -111,18 +114,84 @@
</el-form> </el-form>
</div> </div>
</el-form> </el-form>
<el-dialog title="流转日计划" :close-on-click-modal="false" v-drag :visible.sync="circulationFlag" width="500px">
<el-form :inline="true" label-position="top" style="margin-left: 20px;margin-top: -5px;">
<el-form-item :label="'原排产日期:'">
<el-input v-model="circulationData.date" style="width: 130px;" disabled></el-input>
</el-form-item>
<el-form-item :label="'生产订单号:'">
<el-input v-model="circulationData.orderNo" style="width: 130px;" disabled></el-input>
</el-form-item>
<el-form-item :label="'流转数量:'">
<el-input v-model="circulationData.qty" style="width: 130px;" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" disabled></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 20px;margin-top: -5px;">
<el-form-item :label="'流转日期:'">
<el-date-picker
style="width: 130px"
v-model="circulationData.circulationDate"
type="date"
value-format="yyyy-MM-dd"
@change="getTodayShiftNo()"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'流转班次:'">
<el-select v-model="circulationData.shiftNo" style="width: 130px"
placeholder="请选择">
<el-option
v-for="(item,index) in allShiftNoList"
:key="index"
:label="item.shiftno"
:value="item.shiftno"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'流转机台:'">
<el-select v-model="circulationData.resourceId" style="width: 130px"
placeholder="请选择">
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.resourceID"
:value="item.resourceID"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="doCirculation()">流转</el-button>
<el-button type="primary" @click="circulationFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
</div> </div>
</template> </template>
<script> <script>
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js"
import column from "../common/column";
import { import {
printMaterialLabel, printMaterialLabel,
} from "@/views/modules/production/print_serialNo_label.js" } from "@/views/modules/production/print_serialNo_label.js"
import { import {
getProduceScheduleList, getProduceScheduleList,
changeScheduleCloseFlag, changeScheduleCloseFlag,
getTodayShiftNoList,
getPartCheckData, getPartCheckData,
circulationPlan,
getSORoutingAvailableResourceList,
} from '@/api/production/dailyPlan.js' } from '@/api/production/dailyPlan.js'
import { import {
printSerialNo, printSerialNo,
@ -132,10 +201,38 @@
export default { export default {
name: 'close_schedule', name: 'close_schedule',
components: { components: {
Chooselist
Chooselist,column
}, },
data () { data () {
return { return {
// ------ start-------
showDefault:false,
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "5303Produce",
status: true,
languageCode: this.$i18n.locale
},
// table
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "5303Produce",
languageCode: this.$i18n.locale
},
visible:false,
// ------ end------
circulationData:{
circulationDate:'',
resourceId:'',
shiftNo:'',
qty:'',
date:'',
orderNo:'',
},
circulationRow:{},
partCheckData:{ partCheckData:{
site:'', site:'',
partNo:'', partNo:'',
@ -147,10 +244,12 @@
sum1:'', sum1:'',
sum2:'', sum2:'',
sum3:'', sum3:'',
availableResourceList:[],
printModalFlag:false, printModalFlag:false,
printQty:'', printQty:'',
// start // start
exportData: [], exportData: [],
allShiftNoList:[],
exportName: "排产日计划清单"+this.dayjs().format('YYYYMMDDHHmmss'), exportName: "排产日计划清单"+this.dayjs().format('YYYYMMDDHHmmss'),
exportFooter: [], exportFooter: [],
// end // end
@ -166,13 +265,14 @@
dataList:[], dataList:[],
dataListSelections:[], dataListSelections:[],
dataListLoading: false, dataListLoading: false,
columnArray: [
circulationFlag:false,
columnList: [
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceScheduledDate',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceScheduledDate',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "scheduledDate", columnProp: "scheduledDate",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -187,10 +287,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemDesc',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceItemDesc',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "printFlag", columnProp: "printFlag",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -205,10 +305,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceOrderNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceOrderNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "orderNo", columnProp: "orderNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -223,10 +323,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProducePartNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProducePartNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "partNo", columnProp: "partNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -241,10 +341,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProducePartDesc',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProducePartDesc',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "partDesc", columnProp: "partDesc",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -259,10 +359,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceResourceId',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceResourceId',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "resourceId", columnProp: "resourceId",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -277,10 +377,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceTimeRequired',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceTimeRequired',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "timeRequired", columnProp: "timeRequired",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -295,10 +395,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyRequired',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceQtyRequired',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "qtyRequired", columnProp: "qtyRequired",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -313,10 +413,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyApprove',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceQtyApprove',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "qtyApprove", columnProp: "qtyApprove",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -331,10 +431,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyReported',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceQtyReported',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "qtyReported", columnProp: "qtyReported",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -349,10 +449,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedFlag',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceClosedFlag',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "closedFlag", columnProp: "closedFlag",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -367,10 +467,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceCustomerId',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceCustomerId',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "customerId", columnProp: "customerId",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -385,10 +485,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceCustomerName',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceCustomerName',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "customerName", columnProp: "customerName",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -403,10 +503,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceTechInfo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceTechInfo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "techInfo", columnProp: "techInfo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -421,10 +521,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceItemNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "itemNo", columnProp: "itemNo",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -439,10 +539,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemDesc',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceItemDesc',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "itemDesc", columnProp: "itemDesc",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -457,10 +557,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceSpec',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceSpec',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "spec", columnProp: "spec",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -475,10 +575,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceScheduledSeqNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceScheduledSeqNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "seqNo", columnProp: "seqNo",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -493,10 +593,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceScheduledSeqNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceScheduledSeqNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "scheduledSeqNo", columnProp: "scheduledSeqNo",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -511,10 +611,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceRemark',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceRemark',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "remark", columnProp: "remark",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -530,10 +630,10 @@
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceShiftNo',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceShiftNo',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "shiftNo", columnProp: "shiftNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -549,10 +649,10 @@
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceSite',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceSite',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "site", columnProp: "site",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -568,10 +668,10 @@
// { // {
// userId: this.$store.state.user.name, // userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceCustomerName',
// tableId: "5302Produce",
// tableName: "",
// functionId: this.$route.meta.menuId,
// serialNumber: '5303ProduceCustomerName',
// tableId: "5303Produce",
// tableName: "",
// columnProp: "customerName", // columnProp: "customerName",
// headerAlign: "center", // headerAlign: "center",
// align: "center", // align: "center",
@ -586,10 +686,10 @@
// }, // },
// { // {
// userId: this.$store.state.user.name, // userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceCustPartNo',
// tableId: "5302Produce",
// tableName: "",
// functionId: this.$route.meta.menuId,
// serialNumber: '5303ProduceCustPartNo',
// tableId: "5303Produce",
// tableName: "",
// columnProp: "custPartNo", // columnProp: "custPartNo",
// headerAlign: "center", // headerAlign: "center",
// align: "center", // align: "center",
@ -604,10 +704,10 @@
// }, // },
// { // {
// userId: this.$store.state.user.name, // userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceQtyRequiredOriginal',
// tableId: "5302Produce",
// tableName: "",
// functionId: this.$route.meta.menuId,
// serialNumber: '5303ProduceQtyRequiredOriginal',
// tableId: "5303Produce",
// tableName: "",
// columnProp: "qtyRequiredOriginal", // columnProp: "qtyRequiredOriginal",
// headerAlign: "center", // headerAlign: "center",
// align: "center", // align: "center",
@ -622,10 +722,10 @@
// }, // },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedBy',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceClosedBy',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "closedBy", columnProp: "closedBy",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -640,10 +740,10 @@
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedDate',
tableId: "5302Produce",
tableName: "待生产工单",
functionId: this.$route.meta.menuId,
serialNumber: '5303ProduceClosedDate',
tableId: "5303Produce",
tableName: "流转日计划",
columnProp: "closedDate", columnProp: "closedDate",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -739,6 +839,63 @@
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
}, },
circulation(row){
this.circulationRow=row;
this.circulationData.circulationDate='';
this.circulationData.resourceId='';
this.circulationData.shiftNo='';
this.circulationData.orderNo=row.orderNo;
this.circulationData.date=row.scheduledDate;
this.circulationData.qty=row.qtyRequired;
this.getAvailableResourceList(row)
this.circulationFlag=true;
},
doCirculation(){
if(this.circulationData.circulationDate==null||this.circulationData.circulationDate==""){
this.$alert('请选择流转日期', '错误', {
confirmButtonText: '确定',
});
return false;
}
if(this.circulationData.resourceId==null||this.circulationData.resourceId==""){
this.$alert('请选择机台', '错误', {
confirmButtonText: '确定',
});
return false;
}
if(this.circulationData.shiftNo==null||this.circulationData.shiftNo==""){
this.$alert('请选择班次', '错误', {
confirmButtonText: '确定',
});
return false;
}
let inData={
seqNo:this.circulationRow.seqNo,
date:this.circulationData.circulationDate,
resourceId:this.circulationData.resourceId,
shiftNo:this.circulationData.shiftNo,
}
circulationPlan(inData).then(({data}) => {
if (data && data.code === 0) {
this.circulationRow.scheduledDate=this.circulationData.circulationDate;
this.circulationRow.resourceId=this.circulationData.resourceId;
this.circulationRow.shiftNo=this.circulationData.shiftNo;
this.circulationFlag=false;
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定',
});
}
})
},
getBaseData(val){ getBaseData(val){
if (this.tagNo === 88){ if (this.tagNo === 88){
this.searchData.resourceId = val.ResourceID this.searchData.resourceId = val.ResourceID
@ -757,7 +914,19 @@
this.$refs.baseList.init(val,strVal) this.$refs.baseList.init(val,strVal)
}) })
}, },
getAvailableResourceList (row) {
let inData = {
orderNo: row.orderNo,
site: row.site,
itemNo: row.itemNo,
}
getSORoutingAvailableResourceList(inData).then(({data}) => {
this.availableResourceList = data.rows
if (data.rows.length > 0) {
this.schedulingModalData.resourceId = data.rows[0].resourceID
}
})
},
refreshTables () { refreshTables () {
getProduceScheduleList(this.searchData).then(({data}) => { getProduceScheduleList(this.searchData).then(({data}) => {
// //
@ -775,6 +944,16 @@
} }
}) })
}, },
getTodayShiftNo () {
this.circulationData.shiftNo='';
let inData = {
scheduledate: this.circulationData.circulationDate,
site: this.$store.state.user.site,
}
getTodayShiftNoList(inData).then(({data}) => {
this.allShiftNoList = data.rows
})
},
routingRowClassName2 ({row, rowIndex}) { routingRowClassName2 ({row, rowIndex}) {
let date =new Date(this.dayjs().format('YYYY-MM-DD').replace('-', '/')); let date =new Date(this.dayjs().format('YYYY-MM-DD').replace('-', '/'));
let planDate = new Date(row.scheduledDate.replace('-', '/')) let planDate = new Date(row.scheduledDate.replace('-', '/'))
@ -791,7 +970,62 @@
// return 'customer-row-2'; // return 'customer-row-2';
// } // }
}, },
//--------------Start---------------
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length>0) {
//this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "5303Produce",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
saveColumnList() {
//
// user
removerUser(this.queryTable)
//
removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList;
saveTableDefaultList(sumColumnList).then(({data}) => {
})
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (data.rows.length>0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
//--------------end---------------
},
created() {
this.getTableUserColumn()
} }
} }

28
src/views/modules/production/labelold.js

@ -0,0 +1,28 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/
export function printMaterialLabel(printList) {
const LODOP = getLodop()
if (LODOP) {
//LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_PRINTER_INDEXA("小标签打印机");
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,300,200,"");
LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.serialNo);
LODOP.SET_PRINT_STYLEA(0,"FontName","黑体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",9);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-5);
LODOP.ADD_PRINT_BARCODE(3,31,86,61,"QRCode",printData.serialNo);
}
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
LODOP.PRINT();
console.log("操作成功!")
}
}

6
src/views/modules/production/print_serialNo_label.js

@ -12,12 +12,12 @@ export function printMaterialLabel(printList) {
let printData = printList[i]; let printData = printList[i];
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,300,200,""); LODOP.SET_PRINT_PAGESIZE(0,300,200,"");
LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.serialNo);
LODOP.ADD_PRINT_TEXT(59,21,72,35,printData.serialNo);
LODOP.SET_PRINT_STYLEA(0,"FontName","黑体"); LODOP.SET_PRINT_STYLEA(0,"FontName","黑体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",9);
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2); LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-5); LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-5);
LODOP.ADD_PRINT_BARCODE(3,31,86,61,"QRCode",printData.serialNo);
LODOP.ADD_PRINT_BARCODE(1,26,108,69,"QRCode",printData.serialNo);
} }
// LODOP.PRINT_DESIGN(); // LODOP.PRINT_DESIGN();

Loading…
Cancel
Save