增加了部门工序列表
This commit is contained in:
parent
e0529713cb
commit
f846046d8d
|
|
@ -16,7 +16,13 @@
|
|||
<div v-for="item in detailsData" :key="item.id" class="card-item">
|
||||
<!-- -->
|
||||
|
||||
<h3>【部件】{{ item.component_detail ? item.component_detail.name : '' }}</h3>
|
||||
<h3>【部件】{{ item.component_detail ? item.component_detail.name : '' }}
|
||||
<div class="card-item-progress-img">
|
||||
<img v-if="item.component_img" @click.stop="$hevueImgPreview(item.component_img)"
|
||||
style="width:50px;height:50px;" :src="item.component_img" />
|
||||
<span v-else></span>
|
||||
</div>
|
||||
</h3>
|
||||
<div class="gx-item">
|
||||
|
||||
<div class="gx-item-col">
|
||||
|
|
@ -46,12 +52,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="card-item-progress-img">
|
||||
<img v-if="item.component_detail && item.component_detail.image"
|
||||
@click.stop="$hevueImgPreview(item.component_detail.image)" style="width:50px;height:50px;"
|
||||
:src="item.component_detail.image" />
|
||||
<span v-else></span>
|
||||
</div>
|
||||
|
||||
<div class="card-item-progress">
|
||||
|
||||
|
||||
|
|
@ -66,7 +67,13 @@
|
|||
<div v-for="ditem in detailsData4" :key="ditem.id" class="card-item">
|
||||
<!-- -->
|
||||
|
||||
<h3>【部件】{{ ditem.component_detail ? ditem.component_detail.name : '' }}</h3>
|
||||
<h3>【部件】{{ ditem.component_detail ? ditem.component_detail.name : '' }}
|
||||
<div class="card-item-progress-img">
|
||||
<img v-if="ditem.component_img" @click.stop="$hevueImgPreview(ditem.component_img)"
|
||||
style="width:50px;height:50px;" :src="ditem.component_img" />
|
||||
<span v-else></span>
|
||||
</div>
|
||||
</h3>
|
||||
|
||||
<div v-for="item in ditem.progressList" :key="item.id">
|
||||
|
||||
|
|
@ -103,12 +110,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="card-item-progress-img">
|
||||
|
||||
<img v-if="ditem.component_img" @click.stop="$hevueImgPreview(ditem.component_img)"
|
||||
style="width:50px;height:50px;" :src="ditem.component_img" />
|
||||
<span v-else></span>
|
||||
</div>
|
||||
<div class="card-item-progress">
|
||||
|
||||
<a-progress type="circle" :percent="formatProgress(ditem.progress)" :width="50" />
|
||||
|
|
@ -198,6 +200,54 @@
|
|||
|
||||
|
||||
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane key="3" tab="部门工序列表" force-render>
|
||||
|
||||
<!-- 部门筛选 选中时触发loadDataProgress -->
|
||||
<a-space>
|
||||
<a-select @select="DepartmentChange" :value="department_list_options_default" style="width: 200px"
|
||||
:options="department_list_options"></a-select>
|
||||
</a-space>
|
||||
<!-- 发料筛选 -->
|
||||
<a-select @select="IsSendChange" :value="IsSendDefault" style="width: 200px"
|
||||
:options="IsSendOptions"></a-select>
|
||||
<!-- 完工筛选 -->
|
||||
<a-select @select="IsCompleteChange" :value="IsCompleteDefault" style="width: 200px"
|
||||
:options="IsCompleteOptions"></a-select>
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable3" :height="715" :row-config="{ height: 80 }"
|
||||
:data="detailDataProgress">
|
||||
<vxe-column title="操作" width="90">
|
||||
<template #default="{ row }">
|
||||
<a-button @click="selectPoProgressInfo(row)">选择</a-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="department_name" title="部门" align="center" width="150"></vxe-column>
|
||||
<vxe-column field="process_name" title="工序名称" align="center" width="110"></vxe-column>
|
||||
<vxe-column title="图片" width="75">
|
||||
<template #default="{ row }">
|
||||
<img v-if="row.component_img" style="width:52px;height:52px;" :src="row.component_img"
|
||||
@click.stop="$hevueImgPreview(row.component_img)" />
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<!-- <vxe-column field="production_id" title="布产单id" width="210"></vxe-column> -->
|
||||
<vxe-column field="production_code" title="布产单号" width="110"></vxe-column>
|
||||
<vxe-column field="mold_master_name" align="center" title="模具师傅" width="110"></vxe-column>
|
||||
<vxe-column field="engineer_name" align="center" title="工程师傅" width="110"></vxe-column>
|
||||
<vxe-column field="complete_time" align="center" formatter="formatDate" title="预计完成时间"
|
||||
width="160"></vxe-column>
|
||||
<vxe-column field="status" title="状态" align="center" width="100"></vxe-column>
|
||||
<!-- <vxe-column field="is_send" title="发料" width="160"></vxe-column> -->
|
||||
<vxe-column field="send_time" formatter="formatDate" title="发料日期" width="160"></vxe-column>
|
||||
<vxe-column field="reality_complete_time" formatter="formatDate" title="完工日期" width="160"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="160"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
|
||||
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
|
@ -241,6 +291,7 @@ import BASE_URL from '@/services/mes/api.js';
|
|||
|
||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||
import JSONbig from 'json-bigint'
|
||||
import { ref } from 'vue';
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
|
|
@ -302,9 +353,51 @@ export default {
|
|||
|
||||
detailsData4: [], //按部件分组
|
||||
|
||||
detailDataProgress: [], // 工序部门列表
|
||||
|
||||
|
||||
processesDepartmentId: 0, // 按部门id筛选
|
||||
department_list: [], // 部门列表
|
||||
// department_list_options 默认值为全部
|
||||
department_list_options_default: ref("0"),
|
||||
department_list_options: [
|
||||
{
|
||||
label: "全部部门",
|
||||
value: "0",
|
||||
}
|
||||
], // 部门列表下拉框
|
||||
|
||||
processesIsComplete: 0, // 按是否完成筛选
|
||||
IsCompleteDefault: ref("0"),
|
||||
IsCompleteOptions: [
|
||||
{
|
||||
label: "未完成",
|
||||
value: "0",
|
||||
},
|
||||
{
|
||||
label: "已完成",
|
||||
value: "1",
|
||||
}
|
||||
], // 是否完成下拉框
|
||||
|
||||
|
||||
processesIsSend: 0, // 按是否已发料筛选
|
||||
IsSendDefault: ref("0"),
|
||||
IsSendOptions: [
|
||||
{
|
||||
label: "未发料",
|
||||
value: "0",
|
||||
},
|
||||
{
|
||||
label: "已发料",
|
||||
value: "1",
|
||||
}
|
||||
], // 是否完成下拉框
|
||||
|
||||
poData: [],
|
||||
tips: ["点一", "点二", "点三"],
|
||||
current_mold_production_order_component_processes: [],
|
||||
current_mold_production_order_component: [],
|
||||
formOptions2: {
|
||||
data: {
|
||||
},
|
||||
|
|
@ -479,6 +572,8 @@ export default {
|
|||
this.$refs.inputx.focus();
|
||||
|
||||
this.loadPoData();
|
||||
this.loadDataProgress(185208273404694528, 0);
|
||||
this.loadDeaprtmentData();
|
||||
}, 200)
|
||||
|
||||
//149433255169363968
|
||||
|
|
@ -496,10 +591,12 @@ export default {
|
|||
if (this.tabKey == '2') {
|
||||
this.loadPoData();
|
||||
}
|
||||
if (this.tabKey == '3') {
|
||||
this.loadDataProgress(0, 0);
|
||||
this.loadDeaprtmentData();
|
||||
}
|
||||
},
|
||||
loadPoData() {
|
||||
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/order/list`,
|
||||
loading: "搜索中...",
|
||||
|
|
@ -524,12 +621,53 @@ export default {
|
|||
console.log(this.poData)
|
||||
});
|
||||
},
|
||||
|
||||
loadDeaprtmentData() {
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`,
|
||||
loading: "加载中...",
|
||||
data: {
|
||||
"ptyid": 0,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
|
||||
"search_rules": [
|
||||
],
|
||||
"end_time": 0,
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"store_id": 0,
|
||||
"order_bys": [],
|
||||
"limit": 0,
|
||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"page": 1,
|
||||
"start_time": 0
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.department_list = JSON.parse(JSON.stringify(a.data.BaseDepartment));
|
||||
// 将department_list 中的name值赋值给department_list_options
|
||||
this.department_list_options = this.department_list.map(item => {
|
||||
return {
|
||||
value: item.id,
|
||||
label: item.name
|
||||
}
|
||||
})
|
||||
// 将department_list_options 前面加上全部
|
||||
this.department_list_options.unshift({
|
||||
label: "全部部门",
|
||||
value: "0",
|
||||
})
|
||||
|
||||
});
|
||||
},
|
||||
selectPoInfo(row) {
|
||||
this.loadProductionOrder({ id: row.id })
|
||||
},
|
||||
|
||||
loadData({ key }) {
|
||||
selectPoProgressInfo(row) {
|
||||
this.loadProductionOrder({ id: row.production_id })
|
||||
},
|
||||
|
||||
loadData({ key }) {
|
||||
this.loading = true
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/search`,
|
||||
|
|
@ -555,13 +693,9 @@ export default {
|
|||
}).then(a => {
|
||||
this.loading = false
|
||||
this.tableDataOrders = JSON.parse(JSON.stringify(a.data.mold_production_order || []));
|
||||
|
||||
|
||||
if (this.tableDataOrders.length) {
|
||||
this.loadProductionOrder({ id: this.tableDataOrders[0].id });
|
||||
}
|
||||
|
||||
|
||||
}).catch((a) => {
|
||||
this.loading = false
|
||||
this.$mk.error(a.data.msg);
|
||||
|
|
@ -569,6 +703,86 @@ export default {
|
|||
},
|
||||
|
||||
|
||||
loadDataProgress() {
|
||||
|
||||
// 定义 search_rules
|
||||
let search_rules = [
|
||||
]
|
||||
if (this.processesDepartmentId > 0) {
|
||||
// 有部门id search_rules 条件加上 department_id
|
||||
search_rules.push({
|
||||
"column": "department_id",
|
||||
"mode": "=",
|
||||
"value": this.processesDepartmentId
|
||||
})
|
||||
}
|
||||
if (this.processesIsComplete > 0) {
|
||||
// 没有部门id search_rules 条件加上 is_complete 默认为0
|
||||
search_rules.push({
|
||||
"column": "is_complete",
|
||||
"mode": "=",
|
||||
"value": this.processesIsComplete
|
||||
})
|
||||
} else {
|
||||
search_rules.push({
|
||||
"column": "is_complete",
|
||||
"mode": "=",
|
||||
"value": "0",
|
||||
})
|
||||
}
|
||||
if (this.processesIsSend > 0) {
|
||||
// 没有部门id search_rules 条件加上 is_complete 默认为0
|
||||
search_rules.push({
|
||||
"column": "is_send",
|
||||
"mode": "=",
|
||||
"value": this.processesIsSend
|
||||
})
|
||||
} else {
|
||||
search_rules.push({
|
||||
"column": "is_send",
|
||||
"mode": "=",
|
||||
"value": "0"
|
||||
})
|
||||
}
|
||||
this.loading = true
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/processes/list`,
|
||||
loading: "查询中...",
|
||||
data: {
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"ptyid": 0,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
|
||||
"store_id": 0,
|
||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"search_rules": search_rules,
|
||||
"order_bys": [
|
||||
],
|
||||
"page": 1,
|
||||
"limit": 200,
|
||||
"start_time": 0,
|
||||
"end_time": 0
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.loading = false
|
||||
this.detailDataProgress = JSON.parse(JSON.stringify(a.data.mold_production_order_touch_screen_processes || []));
|
||||
|
||||
this.detailDataProgress.forEach(item => {
|
||||
|
||||
item.department_name = item.department_detail.name
|
||||
item.production_code = item.production_detail.code
|
||||
item.process_name = item.process_detail.name
|
||||
})
|
||||
|
||||
// this.detailDataProgress 中将 production_code 等于 "" 的数据删除
|
||||
this.detailDataProgress = this.detailDataProgress.filter(item => item.production_code != "")
|
||||
}).catch((a) => {
|
||||
this.loading = false
|
||||
this.$mk.error(a.data.msg);
|
||||
});
|
||||
},
|
||||
|
||||
keydownEvent(e) {
|
||||
let event = e.$event;
|
||||
const input = event.target;
|
||||
|
|
@ -721,8 +935,16 @@ export default {
|
|||
|
||||
if (item.department_id.toString() == id.toString()) {
|
||||
ds.push(item);
|
||||
|
||||
}
|
||||
this.current_mold_production_order_component.forEach(item1 => {
|
||||
if (item.component_line == item1.component_line) {
|
||||
item.component_img = item1.component_img;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
this.detailsData = ds;
|
||||
|
||||
}
|
||||
|
|
@ -732,14 +954,16 @@ export default {
|
|||
|
||||
|
||||
else if (code) {
|
||||
|
||||
|
||||
|
||||
this.current_mold_production_order_component_processes.forEach(item => { // 循环所有的
|
||||
// 如果当前的部门编码等于输入的部门编码
|
||||
if (item.department_detail && item.department_detail.code == code) {
|
||||
ds.push(item);
|
||||
}
|
||||
this.current_mold_production_order_component.forEach(item1 => {
|
||||
if (item.component_line == item1.component_line) {
|
||||
item.component_img = item1.component_img;
|
||||
}
|
||||
})
|
||||
})
|
||||
this.detailsData = ds;
|
||||
|
||||
|
|
@ -769,7 +993,7 @@ export default {
|
|||
let ds3 = JSON.parse(JSON.stringify(row.department_progress || []));
|
||||
|
||||
let ds4 = JSON.parse(JSON.stringify(row.mold_production_order_component || []));
|
||||
|
||||
this.current_mold_production_order_component = JSON.parse(JSON.stringify(row.mold_production_order_component || []));
|
||||
|
||||
ds3.forEach(item => {
|
||||
item.progressList = [];
|
||||
|
|
@ -955,6 +1179,22 @@ export default {
|
|||
return progress;
|
||||
|
||||
},
|
||||
DepartmentChange(e) {
|
||||
this.processesDepartmentId = e
|
||||
this.department_list_options_default = ref(e)
|
||||
this.loadDataProgress()
|
||||
},
|
||||
IsCompleteChange(e) {
|
||||
this.processesIsComplete = e
|
||||
this.IsCompleteDefault = ref(e)
|
||||
this.loadDataProgress()
|
||||
},
|
||||
IsSendChange(e) {
|
||||
this.processesIsSend = e
|
||||
this.IsSendDefault = ref(e)
|
||||
this.loadDataProgress()
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
|
|
@ -1003,10 +1243,12 @@ export default {
|
|||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.imagePanel img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
|
|
@ -1109,11 +1351,20 @@ export default {
|
|||
top: 15px;
|
||||
}
|
||||
|
||||
.card-item h3 {
|
||||
position: relative;
|
||||
padding-bottom: 10px;
|
||||
margin: 0;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.card-item-progress-img {
|
||||
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
bottom: 15px;
|
||||
right: 65px;
|
||||
top: 10px;
|
||||
line-height: 0px;
|
||||
}
|
||||
|
||||
.bottom-toast {
|
||||
|
|
|
|||
Loading…
Reference in New Issue