merge:合并二期代码到当前分支

This commit is contained in:
zhouz
2025-11-27 15:25:44 +08:00
280 changed files with 11042 additions and 2341 deletions

View File

@@ -178,6 +178,53 @@
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
title="子卷步序信息"
append-to-body
:visible.sync="dtlVisible"
destroy-on-close
width="1000px"
>
<!--表格渲染-->
<el-table
:data="childrenList"
>
<el-table-column prop="container_name" label="子卷号" show-overflow-tooltip width="210px" />
<el-table-column prop="spec" label="步序" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ dict.label.subSpec[scope.row.spec] }}
</template>
</el-table-column>
<el-table-column prop="result" label="执行结果" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ scope.row.result.toString() }}
</template>
</el-table-column>
<el-table-column prop="param" label="执行参数" show-overflow-tooltip width="150" />
<el-table-column prop="msg" label="备注" show-overflow-tooltip width="150" />
<el-table-column prop="create_time" label="创建时间">
<template slot-scope="scope">
{{ new Date(scope.row.create_time).toLocaleString() }}
</template>
</el-table-column>
<el-table-column label="操作">
<template scope="scope">
<el-button
v-if="scope.row.result==false && scope.row.url"
type="danger"
class="filter-item"
size="mini"
icon="el-icon-position"
@click.native.prevent="syncMes(scope.row)"
>同步</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<span slot="footer" class="dialog-footer">
<el-button @click="dtlVisible = false"> </el-button>
</span>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
@@ -749,6 +796,8 @@ import pagination from '@crud/Pagination'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
import crudPastivtquery from '@/views/wms/stat/pastivt/pastivtquery'
import { format } from 'date-fns'
const defaultForm = {
workorder_id: null,
@@ -788,7 +837,7 @@ const defaultForm = {
}
export default {
name: 'Subpackagerelation',
dicts: ['sub_package_relation', 'IS_OR_NOT'],
dicts: ['sub_package_relation', 'IS_OR_NOT', 'subSpec'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -803,6 +852,8 @@ export default {
},
data() {
return {
dtlVisible: false,
childrenList: [],
permission: {
add: ['admin', 'sub:add'],
edit: ['admin', 'sub:edit'],
@@ -892,10 +943,28 @@ export default {
[CRUD.HOOK.beforeRefresh]() {
return true
},
[CRUD.HOOK.beforeSubmit](row) {
this.$delete(row.form, 'status')
return true
toView(data) {
crudPastivtquery.subRecord(data).then(res => {
if (res) {
this.dtlVisible = true
this.childrenList = res
}
})
},
async syncMes(row) {
const url = 'http://10.1.3.36:8081/' + row.url
const response = await fetch(url, {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
headers: {
'Content-Type': 'application/json'
// 'Content-Type': 'application/x-www-form-urlencoded',
},
body: row.param // body 数据类型必须与“Content-Type”头匹配
})
const data = await response.json()
window.alert(JSON.stringify(data))
},
initQuery() {
const end = new Date()
const start = new Date()

View File

@@ -321,6 +321,18 @@
>
设置右卷
</el-button>
<el-button
slot="right"
v-permission="['urgent']"
class="filter-item"
type="danger"
icon="el-icon-warning-outline"
size="mini"
:disabled="crud.selections.length < 1"
@click="urgentPlan"
>
加急
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="1200px">
@@ -488,7 +500,7 @@
<el-table-column v-if="false" prop="workorder_id" label="分切计划标识" />
<el-table-column prop="status" label="状态" :formatter="formatStatusName" />
<el-table-column prop="order_type" label="订单类型" :formatter="formatTypeName" />
<el-table-column prop="mfg_order_name" label="订单号" min-width="200" >
<el-table-column prop="mfg_order_name" label="订单号" min-width="220">
<template slot-scope="scope">
<el-link type="primary" @click="toView2(scope.$index, scope.row)">{{ scope.row.mfg_order_name }}</el-link>
</template>
@@ -724,6 +736,68 @@ export default {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
urgentPlan() {
const _selectData = this.$refs.table.selection
const data = {
'data': _selectData
}
crudSlittingproductionplan.urgentPlan(data).then(res => {
this.crud.toQuery()
if (res.failInfo.length == 0) {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
} else {
this.$notify({
title: '操作结果',
dangerouslyUseHTMLString: true,
message: this.buildNotificationContent(res),
duration: 0,
offset: 50,
customClass: 'custom-notify'
})
}
})
},
buildNotificationContent(data) {
console.log('通知数据:', data)
// 第一行:统计信息
const stats = `<div>总数:${data.total},成功:${data.success},失败:${data.fail}</div>`
// 第二行:失败信息表格
let tableHtml = ''
if (data.failInfo && Object.keys(data.failInfo).length > 0) {
// 创建表头
const headers = `<tr style="background-color: #f5f5f5;">
<th style="padding: 5px; text-align: left;">卷号</th>
<th style="padding: 5px; text-align: left;">信息</th>
</tr>`
// 创建表格行
const rows = Object.values(data.failInfo).flatMap(errorObj => {
return Object.entries(errorObj).map(([volumeNo, errorMsg]) => {
return `<tr>
<td style="padding: 5px; border: 1px solid #ddd;">${volumeNo}</td>
<td style="padding: 5px; border: 1px solid #ddd;">${errorMsg}</td>
</tr>`
})
}).join('')
tableHtml = `
<div style="margin-top: 10px;">
<div>失败信息:</div>
<table border="1" style="border-collapse: collapse; width: 100%; margin-top: 5px;">
${headers}
${rows}
</table>
</div>
`
} else {
tableHtml = '<div style="margin-top: 10px;">无失败信息</div>'
}
return `${stats}${tableHtml}`
},
inFinish() {
const _selectData = this.$refs.table.selection
const data = {
@@ -810,5 +884,4 @@ export default {
</script>
<style scoped>
</style>

View File

@@ -71,6 +71,14 @@ export function setDirection(data) {
data
})
}
export function urgentPlan(data) {
return request({
url: 'api/slittingproductionplan/urgentPlan',
method: 'post',
data
})
}
export function updates(data) {
return request({
url: 'api/slittingproductionplan',
@@ -79,4 +87,4 @@ export function updates(data) {
})
}
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates }
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates, urgentPlan }

View File

@@ -15,11 +15,11 @@
</el-form-item>
<el-form-item label="工单号" prop="mfgOrder">
<label slot="label">工单号:</label>
<el-input v-model="form.mfgOrder" disabled clearable style="width: 300px" />
<el-input v-model="form.mfgOrder" disabled clearable style="width: 300px" />
</el-form-item>
<el-form-item label="木箱编码" prop="productName">
<label slot="label">木箱编码:</label>
<el-input v-model="form.productName" disabled clearable style="width: 300px" />
<el-input v-model="form.productName" disabled clearable style="width: 300px" />
</el-form-item>
<el-form-item label="木箱描述" prop="description">
<el-select
@@ -45,7 +45,30 @@
</el-form-item>
<el-form-item label="管芯描述" prop="carrierDescription">
<label slot="label">管芯描述:</label>
<el-input v-model="form.carrierDescription" disabled clearable style="width: 300px" />
<el-input v-model="form.carrierDescription" disabled clearable style="width: 300px" />
</el-form-item>
<el-form-item label="同类木箱编码" prop="sameBoxCode">
<label slot="label">同类木箱编码:</label>
<el-input v-model="form.sameBoxCode" disabled clearable style="width: 300px" />
</el-form-item>
<el-form-item label="同类木箱描述" prop="sameBoxName">
<el-select
v-model="form.sameBoxName"
placeholder="木箱描述"
style="width: 400px"
multiple
class="filter-item"
clearable
filterable
@change="hand2"
>
<el-option
v-for="item in typelist"
:key="item.box_type"
:label="item.box_name"
:value="item.box_type"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -101,6 +124,9 @@ export default {
hand(value) {
this.form.productName = value
},
hand2(value) {
this.form.sameBoxCode = value
},
close() {
this.$emit('update:dialogShow', false)
this.form = {}