|
|
@@ -2,7 +2,8 @@
|
|
|
<!-- 登窑 -->
|
|
|
<div class="main-app-form">
|
|
|
<!-- 顶部导航栏 -->
|
|
|
- <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight" :rightIcon="true"></dk-app-nav-bar>
|
|
|
+ <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight"
|
|
|
+ :rightIcon="true"></dk-app-nav-bar>
|
|
|
|
|
|
<!-- 选择工位 -->
|
|
|
<dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')" :readonly="true"
|
|
|
@@ -12,9 +13,15 @@
|
|
|
:readonly="userKind == $config.operationUserType.produceUser" :label="$t('appProductionJobNumber')"
|
|
|
placeholderType="scan" @changeBarCode="queryUser" />
|
|
|
<!-- 窑炉编码-->
|
|
|
- <dk-app-field :readonly="tableRowData.length > 0" :label="$t('appKilnCode')" ref="appKilnCode"
|
|
|
- v-model="formData.kilnCode" @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true"
|
|
|
- @changeBarCode="setFocus('appKilnCarNumber')" placeholderType="scan"></dk-app-field>
|
|
|
+ <!-- <dk-app-field :readonly="tableRowData.length > 0" :label="$t('appKilnCode')" ref="appKilnCode"
|
|
|
+ v-model="formData.kilnCode" @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true"
|
|
|
+ @changeBarCode="setFocus('appKilnCarNumber')" placeholderType="scan"></dk-app-field> -->
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode" :readonly="true"
|
|
|
+ @click="showKilnCode = true" placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
|
|
|
+
|
|
|
<!-- 窑炉车号-->
|
|
|
<dk-app-field :label="$t('appKilnCarNumber')" ref="appKilnCarNumber" v-model="formData.KilnCarNumber"
|
|
|
@changeBarCode="queryCarCode" @clickRightIcon="openQRCodeScan('KilnCarNumber')" :isScanFlg="true"
|
|
|
@@ -35,13 +42,13 @@
|
|
|
|
|
|
<div v-if="productList.length > 0" style="margin: 10px">{{ $t('appOnKilnCarInformation') }}</div>
|
|
|
<!-- 已登窑列表-->
|
|
|
- <dk-app-table v-if="productList.length > 0" :rows="rows" :tableRowData="productList">
|
|
|
+ <dk-app-table v-if="productList.length > 0" :rows="rows" :tableRowData="productList">
|
|
|
</dk-app-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<!-- 保存按钮-->
|
|
|
<div class="app_save_bottom-class">
|
|
|
<dk-app-button @click="save">{{ $t('appSave') }}
|
|
|
@@ -57,6 +64,9 @@
|
|
|
<!-- 窑车位置 -->
|
|
|
<dk-app-single-dropdown typeName="carrierRange" :show="showCarrierRange" @mutiClose="mutiClose('carrierRange')"
|
|
|
:carModelId="formData.modelId" @mutiCommit="mutiCommit($event, 'carrierRange')"></dk-app-single-dropdown>
|
|
|
+ <!-- 窑车编号 -->
|
|
|
+ <dk-app-single-dropdown typeName="kilnCode" :show="showKilnCode" apiType="web" @mutiClose="mutiClose('kilnCode')"
|
|
|
+ @mutiCommit="mutiCommit($event, 'kilnCode')"></dk-app-single-dropdown>
|
|
|
</div>
|
|
|
<!-- 加载页面 -->
|
|
|
<dk-app-loading :loading="loading"></dk-app-loading>
|
|
|
@@ -74,6 +84,7 @@ export default {
|
|
|
let self = this
|
|
|
return {
|
|
|
showPopup: false,//点击 三个小点 弹出popup
|
|
|
+ showKilnCode: false,
|
|
|
gridItemList: [ //右上角功能菜单
|
|
|
// {
|
|
|
// gridName: "装车统计", //装车统计
|
|
|
@@ -135,7 +146,7 @@ export default {
|
|
|
userKind: null,//用户类型
|
|
|
loading: false,
|
|
|
IsPieceSingleFlag: true,
|
|
|
- productList:[],
|
|
|
+ productList: [],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -249,7 +260,7 @@ export default {
|
|
|
ftyId: this.formData.ftyId,//工厂
|
|
|
stationId: this.formData.stationId,//工位
|
|
|
flowNodeId: this.formData.flowNodeId,//工序
|
|
|
- carCode: this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
+ carCode: this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
}
|
|
|
this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params, "queryCarCode", true).then(res => {
|
|
|
if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
@@ -302,7 +313,7 @@ export default {
|
|
|
let tableList = this.tableRowData.filter(it => it.kilnCarPlace)
|
|
|
for (let it of tableList) {
|
|
|
//窑车窑炉存在相同位置
|
|
|
- if ((this.formData.kilnCode + this.format(this.formData.KilnCarNumber) + this.formData.carrierRangeId) == (it.carCode + it.carrierRangeId)) {
|
|
|
+ if ((this.formData.kilnCode + this.format(this.formData.KilnCarNumber) + this.formData.carrierRangeId) == (it.carCode + it.carrierRangeId)) {
|
|
|
this.appToastFail((this.$t('W_118')));
|
|
|
return
|
|
|
}
|
|
|
@@ -311,7 +322,7 @@ export default {
|
|
|
this.tableRowData = this.tableRowData.concat(res.data)
|
|
|
for (let i of this.tableRowData.filter(it => !it.carCode)) {
|
|
|
i.kilnCode = this.formData.kilnCode
|
|
|
- i.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
+ i.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
if (this.formData.carrierRangeId) {
|
|
|
i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
|
|
|
i.carrierRangeId = this.formData.carrierRangeId
|
|
|
@@ -338,6 +349,11 @@ export default {
|
|
|
this.formData.carrierRangeId = Number(e.ids) //选中的 工位id
|
|
|
this.setFocus("prodUser")
|
|
|
}
|
|
|
+
|
|
|
+ if (typeName === 'kilnCode') {
|
|
|
+ this.formData.kilnCode = e.codes
|
|
|
+ this.setFocus("appKilnCarNumber")
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 单选侧拉关闭
|
|
|
@@ -353,6 +369,9 @@ export default {
|
|
|
if (e === 'carrierRange') {
|
|
|
this.showCarrierRange = false
|
|
|
}
|
|
|
+ if (e === 'kilnCode') {
|
|
|
+ this.showKilnCode = false
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
@@ -396,6 +415,13 @@ export default {
|
|
|
* @author : 王英杰
|
|
|
*/
|
|
|
clear() {
|
|
|
+ //窑炉编号存缓存
|
|
|
+ localStorage.setItem('pdaKilnData', JSON.stringify( {
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ userId: this.$store.state.user.id,
|
|
|
+ kilnCode: this.formData.kilnCode
|
|
|
+ }))
|
|
|
+
|
|
|
//操作用户类型---生产工号不清空
|
|
|
if (this.userKind !== this.$config.operationUserType.produceUser) {
|
|
|
this.formData.prodUserId = null
|
|
|
@@ -424,7 +450,7 @@ export default {
|
|
|
setParams() {
|
|
|
this.params = { ...this.formData }
|
|
|
this.params.barCodeList = this.barCodeList
|
|
|
- this.params.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
+ this.params.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 检验
|
|
|
@@ -468,7 +494,6 @@ export default {
|
|
|
this.formData.barCode = ""
|
|
|
break;
|
|
|
case 'queryCarCode'://检验窑炉车
|
|
|
- // this.formData.kilnCode = ""
|
|
|
this.formData.KilnCarNumber = ""
|
|
|
this.setFocus('appKilnCode')
|
|
|
break;
|
|
|
@@ -493,6 +518,17 @@ export default {
|
|
|
this.getWorkStation()
|
|
|
//窑车位置
|
|
|
this.getKilnCarPlace()
|
|
|
+ //获取缓存窑炉编号
|
|
|
+ if (localStorage.getItem('pdaKilnData')) {
|
|
|
+ let pdaKilnData = JSON.parse(localStorage.getItem('pdaKilnData'))
|
|
|
+ if((this.$store.state.user.ftyId === pdaKilnData.ftyId) && (this.$store.state.user.id === pdaKilnData.userId)){
|
|
|
+ this.formData.kilnCode = pdaKilnData.kilnCode
|
|
|
+ this.setFocus("appKilnCarNumber")
|
|
|
+ }else{
|
|
|
+ localStorage.removeItem('pdaKilnData')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
}
|