|
|
@@ -9,19 +9,21 @@
|
|
|
<!-- 下拉区域 -->
|
|
|
<DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
|
|
|
<!--选择工位-->
|
|
|
- <DkFormItem :required="true" prop="stationId" :data-type="$config.dataType.number" :label="$t('stationId')">
|
|
|
+ <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
|
|
|
+ :data-type="$config.dataType.number" :label="$t('stationId')">
|
|
|
<SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
|
|
|
:type="this.$config.MagnifierType.station"
|
|
|
:multiple="false"
|
|
|
+ :search-info="{flowNodeId:flowNodeId}"
|
|
|
@ok="chooseStation"></SelectMagnifier>
|
|
|
</DkFormItem>
|
|
|
<!--生产工号-->
|
|
|
- <DkFormItem :required="true" prop="makeUserName">
|
|
|
- <InputPop ref="makeUserName" v-model="formData.makeUserName"/>
|
|
|
+ <DkFormItem :required="true" prop="prodUserCode">
|
|
|
+ <InputPop ref="prodUserCode" v-model="formData.prodUserCode" @on-blur="onProdUserCode"/>
|
|
|
</DkFormItem>
|
|
|
<!--产品条码-->
|
|
|
- <DkFormItem :required="true" prop="pdtBarcode">
|
|
|
- <InputPop ref="pdtBarcode" v-model="formData.pdtBarcode" @on-blur="onBlurBarCode"/>
|
|
|
+ <DkFormItem :required="true" prop="barCode">
|
|
|
+ <InputPop :readonly="!formData.prodUserCode" ref="barCode" v-model="formData.barCode" @on-blur="onBarCode"/>
|
|
|
</DkFormItem>
|
|
|
<!--产品查询-->
|
|
|
<DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>
|
|
|
@@ -36,25 +38,25 @@
|
|
|
:height="this.tableHeight" primaryKey="uniqueId"
|
|
|
:choose-flag="false">
|
|
|
<!--产品条码-->
|
|
|
- <DkTableColumn field="productCode" width="auto"></DkTableColumn>
|
|
|
+ <DkTableColumn field="uniqueCode" :title="$t('productCode')" width="auto"></DkTableColumn>
|
|
|
<!--产品编码-->
|
|
|
<DkTableColumn field="modelCode" width="auto"></DkTableColumn>
|
|
|
<!--产品名称-->
|
|
|
<DkTableColumn field="modelName" width="auto"></DkTableColumn>
|
|
|
<!--生产工号-->
|
|
|
- <DkTableColumn field="makeUserName" width="auto"></DkTableColumn>
|
|
|
- <!--模具编码-->
|
|
|
- <DkTableColumn field="modelCode" :title="$t('produceModelCode')" width="auto"></DkTableColumn>
|
|
|
+ <DkTableColumn field="prodUserCode" width="auto"></DkTableColumn>
|
|
|
+ <!--模具名称-->
|
|
|
+ <DkTableColumn field="modelMouldCode" :title="$t('produceModelCode')" width="auto"></DkTableColumn>
|
|
|
<!--注浆日期-->
|
|
|
<DkTableColumn field="moldingDate" width="auto"></DkTableColumn>
|
|
|
<!--成型工号-->
|
|
|
- <DkTableColumn field="moldingUser" width="auto"></DkTableColumn>
|
|
|
- <!--TODO 公柸标识?-->
|
|
|
- <!-- <DkTableColumn field="flgBindUnique" type="switch" :switch-disabled="true"></DkTableColumn>-->
|
|
|
- <!--注浆次数-->
|
|
|
- <DkTableColumn field="thisMoldedNum" :title="$t('slipCastingNum')" width="auto"></DkTableColumn>
|
|
|
+ <DkTableColumn field="moldingUserCode" :title="$t('moldingUser')" width="auto"></DkTableColumn>
|
|
|
+ <!--回收标识-->
|
|
|
+ <DkTableColumn field="flgRecycled" type="switch" :switch-disabled="true"></DkTableColumn>
|
|
|
<!--商标-->
|
|
|
<DkTableColumn field="logoName" width="auto"></DkTableColumn>
|
|
|
+ <!--釉色-->
|
|
|
+ <DkTableColumn field="colourName" width="auto"></DkTableColumn>
|
|
|
</DkTable>
|
|
|
</div>
|
|
|
</DkPanel>
|
|
|
@@ -81,10 +83,14 @@
|
|
|
formData: {
|
|
|
stationId: null,
|
|
|
stationName: '',
|
|
|
- makeUserName: '',
|
|
|
- pdtBarcode: '',
|
|
|
+ prodUserId: null,
|
|
|
+ prodUserCode: '',
|
|
|
+ barCode: '',
|
|
|
+ ftyId: self.$store.state.user.ftyId,
|
|
|
},
|
|
|
+ flowNodeId:'c565f042-05fc-411a-9059-21c8758ce171',
|
|
|
tableData: [],
|
|
|
+ workStationList: [],//工位数据
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -96,7 +102,8 @@
|
|
|
productSelect() {
|
|
|
this.$refs['formInline'].validate().then(valid => {
|
|
|
if (valid) {
|
|
|
-
|
|
|
+ //产品条码查询
|
|
|
+ this.onBarCode()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -106,15 +113,50 @@
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
chooseStation(row) {
|
|
|
- console.log('chooseStation', row)
|
|
|
+ if (row && row[0]) {
|
|
|
+ this.formData.stationId = row[0].stationId
|
|
|
+ this.formData.stationName = row[0].stationName
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 生产工号失焦事件
|
|
|
+ * @date : 2023/2/28 9:28
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ onProdUserCode() {
|
|
|
+ let params = {
|
|
|
+ ftyId: this.formData.ftyId,
|
|
|
+ prodUserCode: this.formData.prodUserCode,
|
|
|
+ stationId:this.formData.stationId,
|
|
|
+ flowNodeId: this.flowNodeId,
|
|
|
+ }
|
|
|
+ this.excute(this.$service.collectService, this.$service.collectService.checkProdUserCode, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.formData.prodUserId = res.data
|
|
|
+ }else{
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 产品条码失焦事件
|
|
|
* @date : 2023/2/28 9:28
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
- onBlurBarCode(value) {
|
|
|
- console.log('onBlurBarCode', value)
|
|
|
+ onBarCode() {
|
|
|
+ let params = {
|
|
|
+ ftyId: this.formData.ftyId,
|
|
|
+ barCode: this.formData.barCode,
|
|
|
+ prodUserCode: this.formData.prodUserCode,
|
|
|
+ flowNodeId: this.flowNodeId,
|
|
|
+ }
|
|
|
+ this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.tableData = [res.data]
|
|
|
+ }else{
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 保存
|
|
|
@@ -122,9 +164,48 @@
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
save() {
|
|
|
-
|
|
|
+ this.setParams()
|
|
|
+ this.excute(this.$service.collectService, this.$service.collectService.add, this.params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 设置参数
|
|
|
+ * @date : 2023/3/1 17:14
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ setParams(){
|
|
|
+ this.params = this.formData
|
|
|
+ this.params.flowNodeId = this.flowNodeId
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 获取工位
|
|
|
+ * @date : 2023/3/1 14:54
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ getWorkStation() {
|
|
|
+ let params = {
|
|
|
+ ftyId: this.formData.ftyId,
|
|
|
+ flowNodeId: this.flowNodeId,
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.workStationList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createdInit() {
|
|
|
+ // this.primaryKey = 'dataId' // 设置主键
|
|
|
+ // console.log('formType',this.formType)
|
|
|
+ //获取工位
|
|
|
+ this.getWorkStation()
|
|
|
},
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.createdInit()
|
|
|
+ // this.detail(this.$route.params.id)
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|