|
|
@@ -5,7 +5,7 @@
|
|
|
<template #left>
|
|
|
<!-- 选择成型线 -->
|
|
|
<BaseIndexButton right-button="molding-record-chooseMoldline" ref="chooseMoldline" name="chooseMoldline"
|
|
|
- @click="open($config.routeUrl.moldingItem.chooseMoldline)"/>
|
|
|
+ @click="chooseMoldline"/>
|
|
|
<!-- 清空条件 -->
|
|
|
<BaseIndexButton ref="clearDetail" name="clearDetail"
|
|
|
@click="open($config.routeUrl.moldingItem.clearDetail)"></BaseIndexButton>
|
|
|
@@ -64,6 +64,58 @@
|
|
|
</div>
|
|
|
</DkPanel>
|
|
|
</DkCollapse>
|
|
|
+ <!--选择成型线弹窗-->
|
|
|
+ <DkModal
|
|
|
+ :loading="loading"
|
|
|
+ ref="modal_search"
|
|
|
+ id="search-data-class"
|
|
|
+ class="search-data-class"
|
|
|
+ width="1200px"
|
|
|
+ v-model="chooseModal"
|
|
|
+ :shortcut-flag="false"
|
|
|
+ @modalOk="modalOk"
|
|
|
+ @modalCancel="modalCancel"
|
|
|
+ @on-visible-change="openMoldlineModal"
|
|
|
+ :title="modalTitle">
|
|
|
+ <BaseIndexButtonGroup id="ButtonGroup">
|
|
|
+ <template #left>
|
|
|
+ <BaseIndexButton ref="search" name="search" @click="getDataTable"></BaseIndexButton>
|
|
|
+ <BaseIndexButton :finalFlag="true" ref="clear" name="clear"
|
|
|
+ @click="$refs['searchCond'].clearCondition()"></BaseIndexButton>
|
|
|
+ </template>
|
|
|
+ </BaseIndexButtonGroup>
|
|
|
+ <SearchCond id="search-cond-div" width="1100px" v-if="searchContent && searchContent.length > 0" ref="searchCond"
|
|
|
+ v-model="searchCond" :setFlag="false" :searchContent="searchContent" :col-count="4"></SearchCond>
|
|
|
+ <div style="width: 100%;height: 10px"></div>
|
|
|
+
|
|
|
+ <DkTable
|
|
|
+ ref="moldlineTable"
|
|
|
+ :data="moldlineList"
|
|
|
+ :height="chooseTableHeight"
|
|
|
+ :page-flag="false"
|
|
|
+ :show-setting-flag="false"
|
|
|
+ :freeze="false"
|
|
|
+ :multiple="false"
|
|
|
+ :clearCheckFlag="false"
|
|
|
+ :auto-width-flag="false"
|
|
|
+ :autoWidthFlag="false"
|
|
|
+ primaryKey="moldingId" >
|
|
|
+ <!--成型线-->
|
|
|
+ <DkTableColumn field="moldlineCodeName" :title="$t('moldlineCodeName')" width="200"></DkTableColumn>
|
|
|
+ <!--分组序号-->
|
|
|
+ <DkTableColumn field="groupNo" type="number" width="90"></DkTableColumn>
|
|
|
+ <!--多批次标识-->
|
|
|
+ <DkTableColumn field="flgCanBatches" type="switch" :switch-disabled="true" width="100"></DkTableColumn>
|
|
|
+ <!--模具数量-->
|
|
|
+ <DkTableColumn field="mlGroupItemQty" :title="$t('groupItemQty')" type="number" width="90"></DkTableColumn>
|
|
|
+ <!--绑定工位-->
|
|
|
+ <DkTableColumn field="stationName" :title="$t('stationId')" width="90"></DkTableColumn>
|
|
|
+ <!--已成型日期-->
|
|
|
+ <DkTableColumn field="moldingBatch" type="number" width="100"></DkTableColumn>
|
|
|
+ <!--成型批次-->
|
|
|
+ <DkTableColumn field="moldingDate" type="date" width="100"></DkTableColumn>
|
|
|
+ </DkTable>
|
|
|
+ </DkModal>
|
|
|
<!-- 下部分按钮区域-->
|
|
|
<DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
|
|
|
</div>
|
|
|
@@ -90,6 +142,7 @@ export default {
|
|
|
editColumns:['itemId','flgScrap','scrapReasonId','remarks','moldingId'],
|
|
|
// 画面表单数据
|
|
|
formData: {
|
|
|
+ ftyId:this.$store.state.user.ftyId,
|
|
|
moldingDate: null, // 成型日期
|
|
|
scrapReasonId: null, // 损坯原因
|
|
|
moldingInfo: null,// 成型信息
|
|
|
@@ -138,10 +191,152 @@ export default {
|
|
|
// 备注
|
|
|
{field: 'remarks', type: 'text', width: 'auto'},
|
|
|
],
|
|
|
+ modalTitle: self.$v('chooseMoldline'),//选择成型线弹窗名称
|
|
|
+ chooseTableHeight: 420,//选择成型线弹窗高度
|
|
|
+ // 选择成型线弹窗查询条件
|
|
|
+ formDataMoldline:[],
|
|
|
+ searchCond: {},
|
|
|
+ searchContent:
|
|
|
+ [
|
|
|
+ {
|
|
|
+ itemCode: 'moldingDate',
|
|
|
+ valueFormat: { code: 'moldingDate', default: new Date().toDateStr() },
|
|
|
+ valueKind: 'DATE',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ itemCode: 'moldlineCodeAndName',
|
|
|
+ itemName: 'moldlineCodeName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ itemCode: 'groupNo',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ itemCode: 'moldingBatch',
|
|
|
+ },
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // region 选择成型线
|
|
|
+ /**
|
|
|
+ * @desc : 选择成型线
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2023/2/15 16:39
|
|
|
+ */
|
|
|
+ chooseMoldline() {
|
|
|
+ this.chooseModal = true
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 清空选择框
|
|
|
+ * @author : 周兴
|
|
|
+ * @date : 2023/2/21 15:34
|
|
|
+ */
|
|
|
+ modalCancel() {
|
|
|
+ this.$refs['searchCond'].clearCondition()
|
|
|
+ // 清空数据源
|
|
|
+ this.moldlineList = []
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 打开成型线modal
|
|
|
+ * @author : 周兴
|
|
|
+ * @date : 2023/2/21 15:24
|
|
|
+ */
|
|
|
+ openMoldlineModal(e) {
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ // 清空列表和查询条件
|
|
|
+ this.$refs['searchCond'].clearCondition()
|
|
|
+ // 清空数据源
|
|
|
+ this.moldlineList = []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 获取表格数据
|
|
|
+ * @author : 沈博
|
|
|
+ * @date : 2022/3/7 16:59
|
|
|
+ */
|
|
|
+ getDataTable() {
|
|
|
+ let param = {}
|
|
|
+ param.userId = this.$store.state.user.id
|
|
|
+ param.manageUser = this.$store.state.user.id
|
|
|
+ param.ftyId = this.$store.state.user.ftyId
|
|
|
+ if (this.searchCond) {
|
|
|
+ if(this.searchCond._value.moldingDate){
|
|
|
+ param = Object.assign(param, this.searchCond._value)
|
|
|
+ }
|
|
|
+ // else{
|
|
|
+ // this.searchCond._value.moldingDate= new Date().toDateStr()
|
|
|
+ // param = Object.assign(param, this.searchCond._value)
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ // if (!param.moldingDate) {
|
|
|
+ // this.$Message.warning(this.$t('W_093', {
|
|
|
+ // 'param': this.$t('moldingDate')
|
|
|
+ // }))
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ this.loading = true;
|
|
|
+ this.excute(this.$service.moldingRecordService, this.$service.moldingRecordService.selectMoldingGiveDamage, param).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.moldlineList = res.data.list
|
|
|
+ } else {
|
|
|
+ this.$Message.warning(res.message)
|
|
|
+ this.moldlineList = []
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 选择成线性后确定事件
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2023/2/17 12:57
|
|
|
+ */
|
|
|
+ modalOk() {
|
|
|
+ let batchRows = []
|
|
|
+ if (this.moldlineList) {
|
|
|
+ batchRows = this.$refs['moldlineTable'].batchRows
|
|
|
+ if (batchRows) {
|
|
|
+ //成型日期
|
|
|
+ this.formData.moldingDate = batchRows[0].moldingDate
|
|
|
+ //获取成型记录信息
|
|
|
+ this.getMoldline(batchRows[0].moldingId, batchRows[0].groupId, batchRows[0].moldlineName)
|
|
|
+ // 清空选择界面
|
|
|
+ this.modalCancel()
|
|
|
+ //关闭选择弹框
|
|
|
+ this.chooseModal = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 根据成型线Id获取成型记录信息
|
|
|
+ * @author : 周兴
|
|
|
+ * @date : 2023/2/18 18:35
|
|
|
+ */
|
|
|
+ getMoldline(moldlineId, moldingGroupId,moldlineName) {
|
|
|
+ let params = {
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ moldlineId: moldlineId,
|
|
|
+ moldingGroupId:moldingGroupId
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getMoldingItemByMoldlineId, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ if(res.data && res.data.length > 0){
|
|
|
+ this.moldingRecordList = res.data;
|
|
|
+ this.moldingRecordList.forEach(it=>{
|
|
|
+ if(!it.flgMolding){
|
|
|
+ it['readOnly'] = ['flgScrap']
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 如果未成型标识,不允许进行开模损
|
|
|
+ this.tableDataSocial = res.data.copy(); // 记录原始数据
|
|
|
+ // 给成型线信息赋值
|
|
|
+ this.formData.moldingInfo = moldlineName + '(' + res.data.length + ')'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //endregion
|
|
|
+
|
|
|
// region 列表
|
|
|
/**
|
|
|
* @desc : 选择开模损原因
|
|
|
@@ -179,29 +374,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 选择成型线
|
|
|
- * @author : 姜宁
|
|
|
- * @date : 2023/2/15 16:39
|
|
|
- */
|
|
|
- chooseMoldline() {
|
|
|
- // this.chooseModal = true
|
|
|
- this.$SearchForm({
|
|
|
- type: this.$config.MagnifierType.moldline,
|
|
|
- otherCondition: {manageUser: this.$store.state.user.id}, title: this.$v('chooseMoldline')
|
|
|
- },
|
|
|
- {
|
|
|
- // 切换查询出的数据
|
|
|
- ok: ({batchKeys, batchRows, searchCond}) => {
|
|
|
- if (batchRows && batchRows.length > 0) {
|
|
|
- // 给成型日期赋值
|
|
|
- this.formData.moldingDate = searchCond.lastMoldingDate
|
|
|
- // 获取成型记录信息
|
|
|
- this.getMoldline(batchRows[0].uniqueId, batchKeys[0], batchRows[0].moldlineName)
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
* @desc : 加载数据
|
|
|
* @author : 姜宁
|
|
|
* @date : 2023/1/29 16:33
|
|
|
@@ -227,31 +399,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 获取表格数据
|
|
|
- * @author : 沈博
|
|
|
- * @date : 2022/3/7 16:59
|
|
|
- */
|
|
|
- getDataTable() {
|
|
|
- let param = {}
|
|
|
- param.userId = this.$store.state.user.id
|
|
|
- param.manageUser = this.$store.state.user.id
|
|
|
- param.ftyId = this.$store.state.user.ftyId
|
|
|
- if (this.searchCond) {
|
|
|
- param = Object.assign(param, this.searchCond._value)
|
|
|
- }
|
|
|
- if (param.lastMoldingDate) {
|
|
|
- param.lastMoldingDate = param.lastMoldingDate.toDateStr();
|
|
|
- }
|
|
|
- this.excute(this.$service.moldingService, this.$service.moldingService.searchMoldline, param).then(res => {
|
|
|
- if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- this.moldlineList = res.data;
|
|
|
- } else {
|
|
|
- this.$Message.warning(res.message)
|
|
|
- this.moldlineList = null
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
* @desc : 值改变
|
|
|
* @author : 周兴
|
|
|
* @date : 2023/2/20 11:39
|
|
|
@@ -277,34 +424,6 @@ export default {
|
|
|
// 查询数据
|
|
|
return this.excute(this.$service.moldingService, this.$service.moldingService.searchMoldline, params);
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 根据成型线Id获取成型记录信息
|
|
|
- * @author : 周兴
|
|
|
- * @date : 2023/2/18 18:35
|
|
|
- */
|
|
|
- getMoldline(moldlineId, moldingGroupId,moldlineName) {
|
|
|
- let params = {
|
|
|
- ftyId: this.$store.state.user.ftyId,
|
|
|
- moldlineId: moldlineId,
|
|
|
- moldingGroupId:moldingGroupId
|
|
|
- }
|
|
|
- this.excute(this.$service.commonService, this.$service.commonService.getMoldingItemByMoldlineId, params).then(res => {
|
|
|
- if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- if(res.data && res.data.length > 0){
|
|
|
- this.moldingRecordList = res.data;
|
|
|
- this.moldingRecordList.forEach(it=>{
|
|
|
- if(!it.flgMolding){
|
|
|
- it['readOnly'] = ['flgScrap']
|
|
|
- }
|
|
|
- })
|
|
|
- // 如果未成型标识,不允许进行开模损
|
|
|
- this.tableDataSocial = res.data.copy(); // 记录原始数据
|
|
|
- // 给成型线信息赋值
|
|
|
- this.formData.moldingInfo = moldlineName + '(' + res.data.length + ')'
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// endregion
|
|
|
|
|
|
// region 保存方法
|