|
|
@@ -2,63 +2,36 @@
|
|
|
<!-- 计件工序(单点 和 集中) -->
|
|
|
<div class="main-app-form">
|
|
|
<!-- 顶部导航栏 -->
|
|
|
- <dk-app-nav-bar :title="appActiveTitle"
|
|
|
- @click-left="onClickLeft" @click-right="onClickRight"></dk-app-nav-bar>
|
|
|
+ <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight"></dk-app-nav-bar>
|
|
|
<!-- 选择工位 -->
|
|
|
- <dk-app-field
|
|
|
- v-if="stationList.length>0"
|
|
|
- v-model="formData.stationName"
|
|
|
- :label="$t('stationName')"
|
|
|
- :readonly="true"
|
|
|
- @click="showStation = true"
|
|
|
- placeholderType="choose" is-link arrow-direction="down"
|
|
|
- />
|
|
|
+ <dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')" :readonly="true"
|
|
|
+ @click="showStation = true" placeholderType="choose" is-link arrow-direction="down" />
|
|
|
<!-- 生产工号 -->
|
|
|
- <dk-app-field
|
|
|
- :readonly="!userKind || userKind == $config.operationUserType.produceUser"
|
|
|
- v-model="formData.prodUserCode"
|
|
|
- ref="prodUser"
|
|
|
- :label="$t('appProductionJobNumber')"
|
|
|
- placeholderType="scan"
|
|
|
- @changeBarCode="queryUser"
|
|
|
-
|
|
|
- />
|
|
|
+ <dk-app-field :readonly="!userKind || userKind == $config.operationUserType.produceUser"
|
|
|
+ v-model="formData.prodUserCode" ref="prodUser" :label="$t('appProductionJobNumber')" placeholderType="scan"
|
|
|
+ @changeBarCode="queryUser" />
|
|
|
<!-- 装载具/卸载具-->
|
|
|
- <dk-app-field
|
|
|
- v-if="opnKind && (opnKind !=$config.processType.productCode)"
|
|
|
- :label="opnKind ==$config.processType.dressKilnCar?$t('dressKilnCar'):
|
|
|
- (opnKind ==$config.processType.unloadKilnCar?$t('unloadKilnCar'):
|
|
|
- (opnKind ==$config.processType.kilnCode?$t('vehicleCode'):$t('newCarCode'))
|
|
|
- )"
|
|
|
- :readonly="(opnKind && (opnKind ==$config.processType.exchangeKilnCar ||opnKind ==$config.processType.dressKilnCar) && tableRowData.length>0)"
|
|
|
- ref="carCode"
|
|
|
- v-model="formData.carCode"
|
|
|
- @changeBarCode="onCarCode('carCode')"
|
|
|
+ <dk-app-field v-if="opnKind && (opnKind != $config.processType.productCode)" :label="opnKind == $config.processType.dressKilnCar ? $t('dressKilnCar') :
|
|
|
+ (opnKind == $config.processType.unloadKilnCar ? $t('unloadKilnCar') :
|
|
|
+ (opnKind == $config.processType.kilnCode ? $t('vehicleCode') : $t('newCarCode'))
|
|
|
+ )"
|
|
|
+ :readonly="(opnKind && (opnKind == $config.processType.exchangeKilnCar || opnKind == $config.processType.dressKilnCar) && tableRowData.length > 0)"
|
|
|
+ ref="carCode" v-model="formData.carCode" @changeBarCode="onCarCode('carCode')"
|
|
|
placeholderType="scan"></dk-app-field>
|
|
|
<!-- 原载具-->
|
|
|
- <dk-app-field
|
|
|
- v-if="opnKind && (opnKind ==$config.processType.exchangeKilnCar)"
|
|
|
- :label="$t('oldCarCode')"
|
|
|
- ref="perCarCode"
|
|
|
- v-model="formData.perCarCode"
|
|
|
- @changeBarCode="onCarCode('productCode')"
|
|
|
- :readonly="!formData.carCode"
|
|
|
- placeholderType="scan"></dk-app-field>
|
|
|
+ <dk-app-field v-if="opnKind && (opnKind == $config.processType.exchangeKilnCar)" :label="$t('oldCarCode')"
|
|
|
+ ref="perCarCode" v-model="formData.perCarCode" @changeBarCode="onCarCode('productCode')"
|
|
|
+ :readonly="!formData.carCode" placeholderType="scan"></dk-app-field>
|
|
|
<!-- 产品条码-->
|
|
|
<dk-app-field
|
|
|
- v-if="opnKind && (opnKind ==$config.processType.productCode || opnKind ==$config.processType.dressKilnCar)"
|
|
|
- :label="$t('appProductCode')"
|
|
|
- ref="barCode"
|
|
|
- v-model="formData.barCode"
|
|
|
- @changeBarCode="onBarCode" s
|
|
|
- :readonly="opnKind &&opnKind ==$config.processType.dressKilnCar?
|
|
|
- !formData.carCode:
|
|
|
- !formData.prodUserId"
|
|
|
- placeholderType="scan"></dk-app-field>
|
|
|
+ v-if="opnKind && (opnKind == $config.processType.productCode || opnKind == $config.processType.dressKilnCar)"
|
|
|
+ :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="onBarCode" s :readonly="opnKind && opnKind == $config.processType.dressKilnCar ?
|
|
|
+ !formData.carCode :
|
|
|
+ !formData.prodUserId" placeholderType="scan"></dk-app-field>
|
|
|
|
|
|
|
|
|
<div ref="scrollTable" class="main-app-table">
|
|
|
- <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
|
|
|
+ <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
|
|
|
<!-- 列表-->
|
|
|
<dk-app-table :rows="rows" :tableRowData="tableRowData">
|
|
|
</dk-app-table>
|
|
|
@@ -73,14 +46,13 @@
|
|
|
<dk-app-loading :loading="loading"></dk-app-loading>
|
|
|
<div style=" height: 0">
|
|
|
<dk-app-popup :showPopup="showPopup" :gridItemList="gridItemList" @onClose="onClose"
|
|
|
- @onClick="onClick"></dk-app-popup>
|
|
|
+ @onClick="onClick"></dk-app-popup>
|
|
|
<!-- 工位 -->
|
|
|
<dk-app-single-dropdown typeName="register" :show="showStation" :flowNodeId="formData.flowNodeId"
|
|
|
- @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
|
|
|
- @mutiCommit="mutiCommit($event,'register')"></dk-app-single-dropdown>
|
|
|
+ @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
|
|
|
+ @mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
|
|
|
<!-- 验证标签-->
|
|
|
- <van-popup
|
|
|
- :close-on-click-overlay="false" style="overflow: hidden;width: 85%; height:300px; border-radius: 10px"
|
|
|
+ <van-popup :close-on-click-overlay="false" style="overflow: hidden;width: 85%; height:300px; border-radius: 10px"
|
|
|
v-model="labelModal">
|
|
|
<van-sticky scroll-top="0">
|
|
|
<div style="height: 5vw;background: #fff;"></div>
|
|
|
@@ -88,20 +60,16 @@
|
|
|
{{ modalTitle }}
|
|
|
</div>
|
|
|
</van-sticky>
|
|
|
- <div v-for="(item,index) in pdtLabelKinds"
|
|
|
- :key="index">
|
|
|
- <dk-app-field
|
|
|
- :label="item.labelName" v-model="item.labelCode" placeholderType="input"></dk-app-field>
|
|
|
+ <div v-for="(item, index) in pdtLabelKinds" :key="index">
|
|
|
+ <dk-app-field :label="item.labelName" v-model="item.labelCode" placeholderType="input"></dk-app-field>
|
|
|
</div>
|
|
|
<div class="popup-button">
|
|
|
<div>
|
|
|
- <van-button style="border-radius: 8px;width:95px !important;" plain color="#1B365D"
|
|
|
- @click="reset">取消
|
|
|
+ <van-button style="border-radius: 8px;width:95px !important;" plain color="#1B365D" @click="reset">取消
|
|
|
</van-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <van-button style="border-radius: 8px;width:95px !important;" color="#1B365D"
|
|
|
- @click="saveLabel">确定
|
|
|
+ <van-button style="border-radius: 8px;width:95px !important;" color="#1B365D" @click="saveLabel">确定
|
|
|
</van-button>
|
|
|
</div>
|
|
|
|
|
|
@@ -113,7 +81,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import {appFormMixin} from '@/mixins/appform.js'
|
|
|
+import { appFormMixin } from '@/mixins/appform.js'
|
|
|
|
|
|
export default {
|
|
|
name: "app-register",
|
|
|
@@ -132,14 +100,14 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
rows: [
|
|
|
- {name: 'uniqueCode', title: self.$t('appProductCodeB')}, //产品编码
|
|
|
- {name: 'modelCode', title: self.$t('modelCode')}, //型号编码
|
|
|
- {name: 'modelName', title: self.$t('appmodelKindT')}, //模具型号
|
|
|
- {name: 'logoName', title: self.$t('appLogoName')}, //商标名称
|
|
|
- {name: 'moldingDate', title: self.$t('appFormingDate')}, //成型日期
|
|
|
- {name: 'moldingUserCode', title: self.$t('appMoldingStationNo')},//成型工号
|
|
|
- {name: 'modelMouldCode', title: self.$t('appMoldNo')}, //模具编号
|
|
|
- {name: 'colourName', title: self.$t('colourName')}, //釉色名称
|
|
|
+ { name: 'uniqueCode', title: self.$t('appProductCodeB') }, //产品编码
|
|
|
+ { name: 'modelCode', title: self.$t('modelCode') }, //型号编码
|
|
|
+ { name: 'modelName', title: self.$t('appmodelKindT') }, //模具型号
|
|
|
+ { name: 'logoName', title: self.$t('appLogoName') }, //商标名称
|
|
|
+ { name: 'moldingDate', title: self.$t('appFormingDate') }, //成型日期
|
|
|
+ { name: 'moldingUserCode', title: self.$t('appMoldingStationNo') },//成型工号
|
|
|
+ { name: 'modelMouldCode', title: self.$t('appMoldNo') }, //模具编号
|
|
|
+ { name: 'colourName', title: self.$t('colourName') }, //釉色名称
|
|
|
],//每一条的内容
|
|
|
tableRowData: [],
|
|
|
//标题
|
|
|
@@ -166,7 +134,7 @@ export default {
|
|
|
IsPieceSingleFlag: true, // 是否是单点采集
|
|
|
resData: null, // barcode 返回的数据
|
|
|
labelFlag: false, //默认验证标签
|
|
|
- pdtLabelKinds: [{labelName: "1"}, {labelName: "2"}], //开的验证标签
|
|
|
+ pdtLabelKinds: [{ labelName: "1" }, { labelName: "2" }], //开的验证标签
|
|
|
labelModal: false, //验证标签modal
|
|
|
modalTitle: null,
|
|
|
labelFormData: {},
|
|
|
@@ -195,7 +163,7 @@ export default {
|
|
|
}
|
|
|
this.opnKind = res.data.opnKind
|
|
|
if (res.data.userKind == null) { // 验证 此工序无此用户
|
|
|
- this.$appDialog.alert({message: this.$t('W_117'),}).then(() => {
|
|
|
+ this.$appDialog.alert({ message: this.$t('W_117'), }).then(() => {
|
|
|
// 弹出alert后的逻辑处理
|
|
|
|
|
|
});
|
|
|
@@ -265,7 +233,7 @@ export default {
|
|
|
let pdtLabelKinds = this.pdtLabelKinds
|
|
|
for (let i = 0; i < pdtLabelKinds.size(); i++) {
|
|
|
if (!pdtLabelKinds[i].labelCode) {
|
|
|
- this.appToastFail(this.$t('appLableInput', {'param': pdtLabelKinds[i].labelName}));
|
|
|
+ this.appToastFail(this.$t('appLableInput', { 'param': pdtLabelKinds[i].labelName }));
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
@@ -441,8 +409,12 @@ export default {
|
|
|
if (typeName === 'register') {
|
|
|
this.formData.stationName = e.names//显示 选中的 工位名称
|
|
|
this.formData.stationId = Number(e.ids) //选中的 工位id
|
|
|
- //校验打卡
|
|
|
- this.queryUser()
|
|
|
+
|
|
|
+ if (this.userKind == this.$config.operationUserType.produceUser) {
|
|
|
+ //校验打卡
|
|
|
+ this.queryUser()
|
|
|
+ }
|
|
|
+
|
|
|
this.setFocus("prodUser") //焦点给到生产工号
|
|
|
}
|
|
|
},
|
|
|
@@ -466,7 +438,7 @@ export default {
|
|
|
onClick(item) {
|
|
|
//跳转新页面
|
|
|
item.form = {} //要传的参数
|
|
|
- this.$router.push({name: item.routerName, params: {item: item}})
|
|
|
+ this.$router.push({ name: item.routerName, params: { item: item } })
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
@@ -538,7 +510,7 @@ export default {
|
|
|
* @date : 2023/2/10 11:46
|
|
|
*/
|
|
|
setParams() {
|
|
|
- this.params = {...this.formData}
|
|
|
+ this.params = { ...this.formData }
|
|
|
delete this.params.barCode
|
|
|
this.params.barCodeList = this.barCodeList
|
|
|
},
|
|
|
@@ -563,7 +535,7 @@ export default {
|
|
|
if (!this.opnKind) {
|
|
|
let carCode = this.opnKind == this.$config.processType.dressKilnCar ? this.$t('dressKilnCar') :
|
|
|
(this.opnKind == this.$config.processType.unloadKilnCar ? this.$t('unloadKilnCar') :
|
|
|
- (this.opnKind == this.$config.processType.kilnCode ? this.$t('vehicleCode') : this.$t('newCarCode'))
|
|
|
+ (this.opnKind == this.$config.processType.kilnCode ? this.$t('vehicleCode') : this.$t('newCarCode'))
|
|
|
)
|
|
|
this.appToastFail((carCode + this.$t('appNotNull')));
|
|
|
return false;
|