|
|
@@ -7,7 +7,7 @@
|
|
|
<div class="main">
|
|
|
<!-- 表头-->
|
|
|
<div v-if="pageType === 1">
|
|
|
- <div style="width: 100%;background: white; padding: 10px 17px 10px 17px;">
|
|
|
+ <div style="width: 100%;background: white; padding: 10px 17px 10px 17px;" v-if="settingValue === '3'">
|
|
|
<van-radio-group v-model="radio" direction="horizontal">
|
|
|
<van-radio name="1" icon-size="23px" checked-color="#1B365D" @click="radioClick($event, '1')">
|
|
|
{{ $t('appMouldCodeInstallAuto') }}
|
|
|
@@ -18,7 +18,7 @@
|
|
|
</van-radio-group>
|
|
|
</div>
|
|
|
<!-- 自动模具-->
|
|
|
- <div v-show="radio === '1'">
|
|
|
+ <div v-show="radio === '1' || settingValue === '1'">
|
|
|
<!-- 起始位置序号-->
|
|
|
<dk-app-field :focus="true" :label="$t('appStartItemNo')" typeInput="number" ref="appStartItemNo"
|
|
|
v-model="formData.startItemNo"></dk-app-field>
|
|
|
@@ -34,7 +34,7 @@
|
|
|
|
|
|
</div>
|
|
|
<!-- 条码模具-->
|
|
|
- <div v-show="radio === '2'">
|
|
|
+ <div v-show="radio === '2' || settingValue === '2'">
|
|
|
<!-- 位置序号-->
|
|
|
<dk-app-field :focus="true" :label="$t('appItemNo')" typeInput="number" ref="appItemNo"
|
|
|
v-model="formData.itemNo"></dk-app-field>
|
|
|
@@ -100,7 +100,8 @@ export default {
|
|
|
modelProductNames: '', //产品型号
|
|
|
moldLineGroupNames: '' //成型线分组
|
|
|
},
|
|
|
- tableRowData: []
|
|
|
+ tableRowData: [],
|
|
|
+ settingValue: '3' //系统参数
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -136,7 +137,7 @@ export default {
|
|
|
//存在
|
|
|
if (this.pageType === 1) {
|
|
|
// 上模(带条码)
|
|
|
- type = this.$t('appFMoldLineItemInstall')
|
|
|
+ type = this.$t('appFMoldLineItemInstallById')
|
|
|
}
|
|
|
///卸模 操作函数
|
|
|
this.moldLineItemOperation(type, res.data);
|
|
|
@@ -181,31 +182,38 @@ export default {
|
|
|
*/
|
|
|
moldLineItemOperation(type, data) {
|
|
|
let params = {}
|
|
|
- if (type === this.$t('appFMoldLineItemInstall')) {
|
|
|
+ if (type === this.$t('appFMoldLineItemInstallById')) { //规定 有位置无模具上模
|
|
|
//上模(带条码)
|
|
|
params.itemNo = Number(this.formData.itemNo)
|
|
|
+ params.itemId = data.itemId
|
|
|
params.moldingUser = this.$store.state.user.id //成型工号
|
|
|
params.mouldId = data.uniqueId
|
|
|
params.groupId = this.formData.moldLineGroupIds //成型线分组
|
|
|
params.remarks = this.$t('appMoldingMoldManagementTop')
|
|
|
- } else if (type === this.$t('appFMoldLineItemInstallAuto')) {
|
|
|
- // 上模(无条码)
|
|
|
+ } else if (type === this.$t('appFMoldLineItemInstallAutoById')) {
|
|
|
+ //过滤 无模具 数据
|
|
|
+ let tableRowDataNoKindList = []
|
|
|
+ tableRowDataNoKindList = this.tableRowData.filter(it => {
|
|
|
+ return it.itemKind === '无模'
|
|
|
+ })
|
|
|
let tempList = []
|
|
|
- for (let i = 0; i < this.formData.outputQty; i++) {
|
|
|
- tempList.push({
|
|
|
- itemNo: Number(this.formData.startItemNo) + Number(i), //起始位置序号
|
|
|
- moldingUser: this.$store.state.user.id,//成型工号
|
|
|
- stdNum: Number(this.formData.stdNum),
|
|
|
- modelId: this.formData.modelProductIds, //产品型号
|
|
|
- groupId: this.formData.moldLineGroupIds, //成型线分组
|
|
|
- remarks: this.$t('appMoldingMoldManagementTop'),
|
|
|
- userId: this.$store.state.user.id,
|
|
|
- ftyId: this.$store.state.user.ftyId,
|
|
|
- moldlineId: this.item.form.uniqueId,
|
|
|
- userBindKind: this.item.form.userBindKind,
|
|
|
- type: type
|
|
|
+ // 上模(无条码)
|
|
|
+ //TODO
|
|
|
+ tableRowDataNoKindList.forEach((itemm, index) => {
|
|
|
+ if ((index + 1) <= this.formData.outputQty) {
|
|
|
+ tempList.push({
|
|
|
+ itemId: itemm.itemId,
|
|
|
+ itemNo: Number(this.formData.startItemNo) + Number(index), //起始位置序号
|
|
|
+ stdNum: Number(this.formData.stdNum),
|
|
|
+ pdtModelId: this.formData.modelProductIds, //产品型号
|
|
|
+ groupId: this.formData.moldLineGroupIds, //成型线分组
|
|
|
+ userId: this.$store.state.user.id,
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ moldlineId: itemm.moldlineId,
|
|
|
+ type: type
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- }
|
|
|
params.moldLineItemList = tempList
|
|
|
} else if (type === this.$t('appFMoldLineItemUninstall')) {
|
|
|
// 批量卸模(已选)
|
|
|
@@ -228,7 +236,7 @@ export default {
|
|
|
})
|
|
|
params.moldLineItemUninstallList = moldLineItemUninstallList //批量卸模数组
|
|
|
}
|
|
|
- if (type !== this.$t('appFMoldLineItemUninstall') && type !== this.$t('appFMoldLineItemInstallAuto')) {
|
|
|
+ if (type !== this.$t('appFMoldLineItemUninstall') && type !== this.$t('appFMoldLineItemInstallAutoById')) {
|
|
|
//不等于卸模
|
|
|
params.userId = this.$store.state.user.id
|
|
|
params.ftyId = this.$store.state.user.ftyId
|
|
|
@@ -318,7 +326,7 @@ export default {
|
|
|
if (this.pageType === 1 && this.radio === '1') {
|
|
|
// 上模(无条码)
|
|
|
if (this.validData()) {
|
|
|
- this.moldLineItemOperation(this.$t('appFMoldLineItemInstallAuto'), null);
|
|
|
+ this.moldLineItemOperation(this.$t('appFMoldLineItemInstallAutoById'), null);
|
|
|
}
|
|
|
} else if (this.pageType === 2) {
|
|
|
//卸模
|
|
|
@@ -417,15 +425,43 @@ export default {
|
|
|
},
|
|
|
// endregion
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 获取系统参数
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2023/2/7 17:23
|
|
|
+ */
|
|
|
+ getSettingValue() {
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getSettingValue, {
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ code: 'PDM_008'
|
|
|
+ }, '', true).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.settingValue = res.data
|
|
|
+ if (res.data === '1') {
|
|
|
+ this.radio = res.data
|
|
|
+ } else if (res.data === '2') {
|
|
|
+ this.radio = res.data
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* @desc : 页面初始化
|
|
|
* @author : 于继渤
|
|
|
* @date : 2023/2/7 17:23
|
|
|
*/
|
|
|
created(e) {
|
|
|
+
|
|
|
+ this.getSettingValue()
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//接收参数
|
|
|
//判断传递数据是否成功
|
|
|
if (this.$route.params.item) {
|