Merge branch 'dev' of http://10.10.11.66:3000/mes/nalinv-ui into dev
This commit is contained in:
commit
835df63e8b
@ -1,5 +1,6 @@
|
||||
import request from '@/router/axios'
|
||||
import {iep} from "@/api/prefix";
|
||||
import {int} from "@/api/prefix";
|
||||
|
||||
export function getMaterialConsumptionTransactionPage(query) {
|
||||
return request({
|
||||
@ -24,3 +25,19 @@ export function getShopOrderStatisticsTransactionPage(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function callErpShopOrderStatisticsTransaction(dataList) {
|
||||
return request({
|
||||
url: int('/shopOrderStatisticTransCallErp/callErp'),
|
||||
method: 'post',
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
export function callErpSoStatistCancelTransaction(dataList) {
|
||||
return request({
|
||||
url: int('/shopOrderStatisticTransCallErp/callErpCancel'),
|
||||
method: 'post',
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
@ -116,6 +116,19 @@
|
||||
</el-input>
|
||||
<span style="margin-left: 20px">{{ form.resrce ? form.resrceDesc : '' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验细类:" prop="qcSubCategories">
|
||||
<span v-if="state === 'view'">
|
||||
{{ form.qcSubCategories }}
|
||||
</span>
|
||||
<el-select v-else v-model="form.qcSubCategories" placeholder="请选择" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in qcSubCategoriesList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@ -184,7 +197,7 @@ export default {
|
||||
lotNo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('rules.selectProductionBatch'),
|
||||
message: '请选择生产批/料件编号',
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
],
|
||||
@ -242,6 +255,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.opTypeList = dynamicFunction.getDictList('operation_type')
|
||||
this.qcSubCategoriesList = dynamicFunction.getDictList('QC_SUB_CATEGORIES')
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
@ -255,6 +269,7 @@ export default {
|
||||
operation: f.operation,
|
||||
qcPlan: f.qcPlan,
|
||||
resrce: f.resrce,
|
||||
qcSubCategories: f.qcSubCategories,
|
||||
}
|
||||
if (this.state == 'add') {
|
||||
this.doAdd(req)
|
||||
|
||||
@ -41,6 +41,9 @@
|
||||
<el-form-item :label="$t('mes.equipment') + ':'" prop="resrce">
|
||||
{{ form.resrceDesc ? `${form.resrce}/ ${form.resrceDesc}` : form.resrce }}
|
||||
</el-form-item>
|
||||
<el-form-item label="检验细类:" prop="qcSubCategories">
|
||||
{{form.qcSubCategories}}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('mes.pms.compDate') + ':'" prop="completeDateTime">
|
||||
{{ form.status == '4' ? '' : form.completeDateTime }}
|
||||
</el-form-item>
|
||||
@ -156,8 +159,14 @@ export default {
|
||||
watch: {
|
||||
model: {
|
||||
handler(newValue) {
|
||||
let me = this
|
||||
this.form = copyJSON(newValue)
|
||||
if (!this.form) return
|
||||
for (let i = 0; i < me.form.qcSubCategoriesList.length; i++) {
|
||||
if (me.form.qcSubCategoriesList[i].value == newValue.qcSubCategories) {
|
||||
me.form.qcSubCategories = me.form.qcSubCategoriesList[i].label
|
||||
}
|
||||
}
|
||||
if (this.form.qcFreq == 'MANUAL') {
|
||||
this.form.qcFreq = this.$t('mes.qms.manual')
|
||||
} else {
|
||||
|
||||
@ -5,6 +5,7 @@ export const jobForm = {
|
||||
operation: '',
|
||||
resrce: '',
|
||||
status: '1',
|
||||
qcSubCategories:'0'
|
||||
}
|
||||
export const judgeForm = {
|
||||
jobNo: null,
|
||||
|
||||
@ -399,6 +399,7 @@ export default {
|
||||
this.itemData = res.data.data.records
|
||||
})
|
||||
.catch(() => {})
|
||||
this.qcSubCategoriesList = dynamicFunction.getDictList('QC_SUB_CATEGORIES')
|
||||
},
|
||||
methods: {
|
||||
async selectRow(row) {
|
||||
@ -423,6 +424,7 @@ export default {
|
||||
this.viewModel = Object.assign({}, row)
|
||||
this.viewModel.waiver = this.viewModel.result == '2' ? 'Y' : 'N'
|
||||
this.viewModel.createAbn = this.viewModel.abnGroup ? 'true' : 'false'
|
||||
this.viewModel.qcSubCategoriesList = this.qcSubCategoriesList
|
||||
if (this.viewModel.qcPlan) {
|
||||
await this.$refs.view.getQcPlanAPI(this.viewModel.qcPlan)
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ export const init = {
|
||||
operation: '',
|
||||
resrce: '',
|
||||
status: '1',
|
||||
qcSubCategories:'0'
|
||||
}
|
||||
|
||||
export const searchRules = {}
|
||||
|
||||
@ -205,12 +205,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-row :gutter="10" v-if="form.inspecType == '1'">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="samplePlan">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
content="抽样规则"
|
||||
:require="
|
||||
rules.samplePlan && rules.samplePlan.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
@ -547,7 +550,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 抽樣規則 -->
|
||||
<el-table-column prop="samplePlan" :label="$t('mes.samplingRule')" width="auto">
|
||||
<el-table-column prop="samplePlan" :label="$t('mes.samplingRule')" width="auto"
|
||||
v-if = "form.inspecType != '0' ">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
v-if="
|
||||
@ -560,8 +564,8 @@
|
||||
>
|
||||
{{ scope.row.samplePlan }}
|
||||
</span>
|
||||
<el-input v-else v-model="scope.row.samplePlan" :readonly="true">
|
||||
<i
|
||||
<el-input v-else v-model="scope.row.samplePlan" :readonly="true" :disabled="form.inspecType == '1'">
|
||||
<i v-if="form.inspecType != '1'"
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showDialogTable('samplePlan', scope.$index)"
|
||||
@ -900,6 +904,19 @@ export default {
|
||||
},
|
||||
},
|
||||
],
|
||||
samplePlan:[
|
||||
{
|
||||
required: true,
|
||||
trigger: ['change', 'blur'],
|
||||
validator: (rule, value, callback) => {
|
||||
if (isBlank(value) && this.form.inspecType == '1') {
|
||||
callback(new Error('请选择抽样规则'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
formVisible: false,
|
||||
dialogWidth: '60%',
|
||||
@ -1197,6 +1214,9 @@ export default {
|
||||
let me = this
|
||||
if (isBlank(me.form.item)) {
|
||||
return this.$message.error('检验对象物料不能为空')
|
||||
}
|
||||
if (isBlank(me.form.samplePlan) && me.form.inspecType == '1') {
|
||||
return this.$message.error('抽样规则不能为空')
|
||||
}
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
@ -1249,12 +1269,18 @@ export default {
|
||||
checkTableRepeat(this, this.tableData, 'qcItem', [], 'flag')
|
||||
if (this.flag) return
|
||||
this.tableData.forEach((t) => {
|
||||
if (t.qcItem && isBlank(t.samplePlan) && t.itemType !== '2' && this.form.inspecType != '3') {
|
||||
this.flag = true
|
||||
msg +=
|
||||
this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
'<br />'
|
||||
}
|
||||
// if (t.qcItem && isBlank(t.samplePlan) && t.itemType !== '2' && this.form.inspecType != '3') {
|
||||
// this.flag = true
|
||||
// msg +=
|
||||
// this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
// '<br />'
|
||||
// }
|
||||
if (!(me.form.inspecType == '0' && (t.itemType == '0' || t.itemType == '1' ))) {
|
||||
this.flag = true
|
||||
msg +=
|
||||
this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
'<br />'
|
||||
}
|
||||
if (t.itemType == '1') {
|
||||
switch (t.controlMode) {
|
||||
case '0':
|
||||
@ -1394,7 +1420,19 @@ export default {
|
||||
.catch(() => {})
|
||||
},
|
||||
tableAdd() {
|
||||
this.tableData.push({isRequired:'Y',photosMust:'N'})
|
||||
let me = this
|
||||
let obj = {
|
||||
isRequired:'Y',
|
||||
photosMust:'N'
|
||||
}
|
||||
if (me.form.inspecType == '1' ) {
|
||||
if (isBlank(me.form.samplePlan)) {
|
||||
return this.$message.error('请先选择抽样规则')
|
||||
} else {
|
||||
obj.samplePlan = me.form.samplePlan
|
||||
}
|
||||
}
|
||||
this.tableData.push(obj)
|
||||
setSeq(this.tableData, 'seq')
|
||||
},
|
||||
tableLess() {
|
||||
|
||||
@ -129,8 +129,8 @@
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleMcSizeChange"
|
||||
@current-change="handleMcCurrentChange"
|
||||
:current-page="page.currentPage"
|
||||
:page-sizes="[5, 10, 20, 50]"
|
||||
:page-size="page.pageSize"
|
||||
@ -191,8 +191,8 @@
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handlePageComSizeChange"
|
||||
@current-change="handlePageComCurrentChange"
|
||||
:current-page="pageCom.currentPage"
|
||||
:page-sizes="[5, 10, 20, 50]"
|
||||
:page-size="pageCom.pageSize"
|
||||
@ -220,41 +220,42 @@
|
||||
<el-col :span="24">
|
||||
<el-table :data="wipReportList" max-height="360" :header-cell-style="{ 'text-align': 'center' }"
|
||||
highlight-current-row
|
||||
ref="wipReportMultipleTable"
|
||||
@selection-change="wipReportSelectionChange"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="80" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间" width="150"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="140"></el-table-column>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单"></el-table-column>
|
||||
<el-table-column prop="lotNo" label="LOT号"></el-table-column>
|
||||
<el-table-column prop="item" label="产出物料"></el-table-column>
|
||||
<el-table-column prop="item" label="物料描述"></el-table-column>
|
||||
<el-table-column prop="sapBatchNo" label="SAP批次"></el-table-column>
|
||||
<el-table-column prop="externalLot" label="客户批号"></el-table-column>
|
||||
<el-table-column prop="productType" label="入库类型"></el-table-column>
|
||||
<el-table-column prop="mainQty" label="数量"></el-table-column>
|
||||
<el-table-column prop="mainUom" label="单位"></el-table-column>
|
||||
<el-table-column prop="resource" label="资源"></el-table-column>
|
||||
<el-table-column prop="operation" label="工序"></el-table-column>
|
||||
<el-table-column prop="item" label="产出物料" width="100"></el-table-column>
|
||||
<el-table-column prop="mainUom" label="主单位"></el-table-column>
|
||||
<el-table-column prop="subUom" label="辅单位"></el-table-column>
|
||||
<el-table-column prop="subQty" label="辅单位数量" width="100"></el-table-column>
|
||||
<el-table-column prop="qcGrade" label="判定等级"></el-table-column>
|
||||
<el-table-column prop="transactionType" label="事务类型"></el-table-column>
|
||||
<el-table-column prop="transactionDate" label="事务日期"></el-table-column>
|
||||
<el-table-column prop="" label="班次"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="过账日期"></el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库"></el-table-column>
|
||||
<el-table-column prop="storageLocation" label="存储位置"></el-table-column>
|
||||
<el-table-column prop="erpInventory" label="ERP仓库"></el-table-column>
|
||||
<el-table-column prop="inventoryMark" label="特殊库存标识" width="110"></el-table-column>
|
||||
<el-table-column prop="inventoryType" label="库存类型"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="SAP同步状态" width="110"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="SAP提交用户" width="110"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="SAP同步日期" width="110"></el-table-column>
|
||||
<el-table-column prop="syncVoucherNo" label="SAP凭证编号" width="110"></el-table-column>
|
||||
<el-table-column prop="laborTime" label="人工工时"></el-table-column>
|
||||
<el-table-column prop="machineTime" label="机器工时"></el-table-column>
|
||||
<el-table-column prop="abnormalTime" label="异常停机时间" width="150"></el-table-column>
|
||||
<el-table-column prop="switchTime" label="设备清机换型时间" width="150"></el-table-column>
|
||||
<el-table-column prop="energy" label="能耗"></el-table-column>
|
||||
<el-table-column prop="accessories" label="辅料"></el-table-column>
|
||||
<el-table-column prop="others" label="其它"></el-table-column>
|
||||
<el-table-column prop="confirmedUser" label="报工确认人" width="100"></el-table-column>
|
||||
<el-table-column prop="confirmedDate" label="确认时间"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="同步提交人" width="100"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="同步过账日期" width="120"></el-table-column>
|
||||
<el-table-column prop="syncTransBatch" label="同步请求处理编号" width="140"></el-table-column>
|
||||
<el-table-column prop="syncTransDate" label="同步请求处理时间" width="140"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="同步结果"></el-table-column>
|
||||
<el-table-column prop="syncMessageText" label="消息文本" width="160"></el-table-column>
|
||||
<el-table-column prop="syncMessageNo" label="同步系统消息编号" width="130"></el-table-column>
|
||||
<el-table-column prop="syncMessageRemark" label="同步消息识别" width="130"></el-table-column>
|
||||
</el-table>
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleWipReSizeChange"
|
||||
@current-change="handleWipReCurrentChange"
|
||||
:current-page="wipRe.currentPage"
|
||||
:page-sizes="[5, 10, 20, 50]"
|
||||
:page-size="wipRe.pageSize"
|
||||
@ -266,6 +267,16 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8"></el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="soSyncAction">生产报工提交同步</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="soSyncCancelAction">生产报工取消</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8"></el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
@ -277,11 +288,11 @@
|
||||
import {getStore} from '@/util/store';
|
||||
|
||||
//引入相关样式
|
||||
import '@vue-office/docx/lib/index.css';
|
||||
import '@vue-office/excel/lib/index.css';
|
||||
import {hideLoading, showLoading} from '@/const/loading';
|
||||
import {fetchItemList as fetchDictList} from '@/api/admin/dict';
|
||||
import {
|
||||
callCallErpSoStatisticsTransaction,
|
||||
callErpShopOrderStatisticsTransaction, callErpSoStatistCancelTransaction,
|
||||
getMaterialCompleteTransactionPage,
|
||||
getMaterialConsumptionTransactionPage,
|
||||
getShopOrderStatisticsTransactionPage
|
||||
@ -290,6 +301,7 @@ import {fetchList as userShiftFetchList} from "@/api/mes/prd/work-group/user-wor
|
||||
import {fetchList as fabNoFetchList} from "@/api/mes/smd/fab-basis";
|
||||
import {fetchList as fetchWorkCenterList} from "@/api/mes/prd/work-center";
|
||||
import {copyJSON} from "@/util/util";
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
name: 'wip-report-sap',
|
||||
@ -311,25 +323,6 @@ export default {
|
||||
senPayFormVisible: false,
|
||||
userShiftList: [],
|
||||
statusList: [],
|
||||
outStateList: [{
|
||||
label: '默认',
|
||||
value: '0'
|
||||
}, {
|
||||
label: '已出库',
|
||||
value: '1'
|
||||
}, {
|
||||
label: '已入库',
|
||||
value: '2'
|
||||
}],
|
||||
typeList: [
|
||||
{
|
||||
label: '白包',
|
||||
value: 'B'
|
||||
}, {
|
||||
label: '彩包',
|
||||
value: 'C'
|
||||
}
|
||||
],
|
||||
searchFormObj: {
|
||||
site: getStore({name: 'tenantId'}),
|
||||
userShift: '',
|
||||
@ -337,8 +330,8 @@ export default {
|
||||
fabNoBo: '',
|
||||
workCenter: '',
|
||||
shopOrder: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
startTime: moment().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
endTime: moment().endOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
status: ''
|
||||
},
|
||||
fabNoDialogVisible: false,
|
||||
@ -388,7 +381,8 @@ export default {
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 20 // 每页显示多少条
|
||||
}
|
||||
},
|
||||
wipReportSelection: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -514,8 +508,9 @@ export default {
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
};
|
||||
me.saleMainList = [];
|
||||
me.saleDetailList = [];
|
||||
me.materialConsumptionList = [];
|
||||
me.wipReportList = [];
|
||||
me.materialCompleteList = [];
|
||||
},
|
||||
|
||||
// 取消
|
||||
@ -524,11 +519,25 @@ export default {
|
||||
me.salesOutDataVisible = false;
|
||||
},
|
||||
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
handleWipReSizeChange(val) {
|
||||
this.wipRe.pageSize = val;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val;
|
||||
handleWipReCurrentChange(val) {
|
||||
this.wipRe.currentPage = val;
|
||||
},
|
||||
|
||||
handlePageComSizeChange(val) {
|
||||
this.pageCom.pageSize = val;
|
||||
},
|
||||
handlePageComCurrentChange(val) {
|
||||
this.pageCom.currentPage = val;
|
||||
},
|
||||
|
||||
handleMcSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
},
|
||||
handleMcCurrentChange(val) {
|
||||
this.page.currentPage = val;
|
||||
},
|
||||
|
||||
getRowKey(row) {
|
||||
@ -544,6 +553,46 @@ export default {
|
||||
let me = this;
|
||||
let obj = sourceList.find(item => item.value === srcVal);
|
||||
return obj != undefined ? obj.label : srcVal;
|
||||
},
|
||||
|
||||
// 同步工单报工数据
|
||||
soSyncAction(){
|
||||
let me = this;
|
||||
if(me.wipReportSelection.length>0){
|
||||
showLoading();
|
||||
callErpShopOrderStatisticsTransaction(me.wipReportSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步工单报工取消事件
|
||||
soSyncCancelAction(){
|
||||
let me = this;
|
||||
if(me.wipReportSelection.length>0){
|
||||
showLoading();
|
||||
callErpSoStatistCancelTransaction(me.wipReportSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
wipReportSelectionChange(val){
|
||||
this.wipReportSelection = val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* https://cli.vuejs.org/zh/config/
|
||||
*/
|
||||
const url = 'http://mom-gateway:9999'
|
||||
// const url = 'http://192.168.100.8:11001'
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
const productionGzipExtensions = ['js', 'css']
|
||||
const path = require('path')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user