update
This commit is contained in:
parent
bbfd450c9f
commit
77eab26048
@ -39,8 +39,8 @@
|
||||
<script>
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
|
||||
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
|
||||
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- 集成测试环境 -->
|
||||
|
@ -20,6 +20,11 @@ export default {
|
||||
delete: '#FF5454',
|
||||
preview: '#f09843',
|
||||
design: '#99089f',
|
||||
'destroy-order': '#FF5454',
|
||||
'confirm-order': '#37d97f',
|
||||
'end-order': '#f09843',
|
||||
'move-to-top': '#8833ff',
|
||||
'move-to-bottom': '#8833ff',
|
||||
// 'view-trend': 'red'
|
||||
// add more...
|
||||
},
|
||||
@ -72,11 +77,11 @@ export default {
|
||||
btns.push(
|
||||
h('el-button',
|
||||
{
|
||||
props: { type: 'text' },
|
||||
props: { type: opt.type ?? 'text', icon: opt.icon ? `el-icon-${opt.icon}` : '', title: opt.label ?? opt.name },
|
||||
style: { color: this.colors[opt.name] || '#0b58ff' },
|
||||
on: { click: this.emit.bind(null, opt) }
|
||||
},
|
||||
this.text[opt.name]
|
||||
opt.icon ? opt.showText ? this.text[opt.name] ?? opt.label : '' : ''
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -89,7 +94,7 @@ export default {
|
||||
style: { color: this.colors[opt] || '#0b58ff' },
|
||||
on: { click: this.emit.bind(null, opt) }
|
||||
},
|
||||
this.text[opt]
|
||||
this.text[opt] ?? opt
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -32,7 +32,8 @@
|
||||
return val + 1 + (page - 1) * size;
|
||||
}
|
||||
: null
|
||||
"
|
||||
"
|
||||
:fixed="head.fixed || null"
|
||||
v-bind="head.more"
|
||||
></el-table-column>
|
||||
<!-- 普通的表头 -->
|
||||
|
@ -24,9 +24,8 @@
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.ongoingTable"
|
||||
:table-data="dataList"
|
||||
:table-data="dataLists.ongoing"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
@ -55,7 +54,6 @@
|
||||
:column-config="tableConfigs.pendingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
<el-pagination
|
||||
@ -83,7 +81,6 @@
|
||||
:column-config="tableConfigs.finishedTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
@ -260,11 +257,31 @@ export default {
|
||||
],
|
||||
},
|
||||
},
|
||||
conditions: {
|
||||
ongoing: {
|
||||
limit: 20,
|
||||
code: "",
|
||||
page: 1,
|
||||
},
|
||||
pending: {
|
||||
limit: 20,
|
||||
page: 1,
|
||||
},
|
||||
finished: {
|
||||
limit: 20,
|
||||
page: 1,
|
||||
},
|
||||
},
|
||||
dataLists: {
|
||||
ongoing: [],
|
||||
pending: [],
|
||||
finished: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
inject: ["urls"],
|
||||
mounted() {
|
||||
this.getConfirmedList();
|
||||
this.getSpecificList("ongoing", this.conditions.ongoing);
|
||||
console.log("[list view with head]", this.headConfigs);
|
||||
},
|
||||
activated() {
|
||||
@ -272,53 +289,33 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// get confirmed list
|
||||
getConfirmedList() {
|
||||
this.$http
|
||||
.post(this.urls.confirmedOrder, {
|
||||
bomId: "0",
|
||||
cate: "1",
|
||||
code: "39999",
|
||||
startTime: "2022-02-05T22:00:00",
|
||||
endTime: "2022-02-06T22:00:00",
|
||||
id: "0",
|
||||
limit: 10,
|
||||
page: 1,
|
||||
shapeId: "1",
|
||||
techId: "0",
|
||||
types: 1, // 0 等待 , 1 确认 , 2 生产, 3 暂停, 4 结束, 5 接受, 6 拒绝
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log("[get confirmed list]", res);
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// get unconfirmed list
|
||||
getUnConfirmedList() {},
|
||||
// get ended list
|
||||
getEndedList() {
|
||||
// 只有查看详情
|
||||
},
|
||||
getSpecificList(type, payload) {
|
||||
let url = "#";
|
||||
switch (type) {
|
||||
case "ongoing":
|
||||
url = this.urls.confirmedOrder;
|
||||
break;
|
||||
case "pending":
|
||||
url = this.urls.unConfirmedOrder;
|
||||
break;
|
||||
case "finished":
|
||||
url = this.urls.finishedOrder;
|
||||
break;
|
||||
}
|
||||
|
||||
handleLoadSub({ tree, treeNode, resolve }) {
|
||||
// console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
|
||||
this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
|
||||
this.$http.post(url, payload).then(({ data: res }) => {
|
||||
if (res.code === 0 && res.data) {
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
if (item.children) item.hasChildren = true;
|
||||
|
||||
/** TODO: 合并物料类型 和 类别 */
|
||||
|
||||
return item;
|
||||
})
|
||||
);
|
||||
if ("list" in res.data) {
|
||||
console.log("list .............", res.data.list);
|
||||
this.dataLists[type] = res.data.list
|
||||
} else console.log("没有res.data.list属性");
|
||||
} else {
|
||||
this.dataLists[type].splice(0)
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -441,17 +438,25 @@ export default {
|
||||
location.reload();
|
||||
},
|
||||
|
||||
handleBtnClick({ btnName, payload }) {
|
||||
console.log("[search] form handleBtnClick", btnName, payload);
|
||||
switch (btnName) {
|
||||
case "新增":
|
||||
this.openDialog();
|
||||
break;
|
||||
case "查询": {
|
||||
this.getList(payload);
|
||||
break;
|
||||
handleBtnClick(type, { btnName, payload }) {
|
||||
switch (type) {
|
||||
case "ongoing": {
|
||||
}
|
||||
case "pending":
|
||||
break;
|
||||
case "finished":
|
||||
break;
|
||||
}
|
||||
// console.log("[search] form handleBtnClick", type, btnName, payload);
|
||||
// switch (btnName) {
|
||||
// case "新增":
|
||||
// this.openDialog();
|
||||
// break;
|
||||
// case "查询": {
|
||||
// this.getList(payload);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
/** 导航器的操作 */
|
||||
|
@ -22,35 +22,39 @@ export default function () {
|
||||
|
||||
const operations = {
|
||||
'ongoing': [
|
||||
{ name: 'view-detail', label: '查看详情' },
|
||||
{ name: 'end-order', label: '结束订单' },
|
||||
{ name: 'confirm-order', label: '确认订单' },
|
||||
{ name: 'move-to-top', label: 'to top', icon: 'top' },
|
||||
{ name: 'move-up', label: 'up', icon: 'top' },
|
||||
{ name: 'move-down', label: 'down', icon: 'top' },
|
||||
{ name: 'move-to-bottom', label: 'to bottom', icon: 'top' },
|
||||
{ name: 'destroy-order', label: '废除订单' },
|
||||
// { name: 'view-detail', label: '查看详情' },
|
||||
{ name: 'confirm-order', label: '确认', icon: 'success', showText: true },
|
||||
{ name: 'end-order', label: '结束', icon: 'error', showText: true },
|
||||
{ name: 'move-up', label: '上移', icon: 'caret-top', showText: true },
|
||||
{ name: 'move-down', label: '下移', icon: 'caret-bottom', showText: true },
|
||||
{ name: 'move-to-top', label: '至顶', icon: 'upload2', showText: true },
|
||||
{ name: 'move-to-bottom', label: '至底', icon: 'download', showText: true },
|
||||
{ name: 'destroy-order', label: '废除', icon: 'delete-solid', showText: true },
|
||||
],
|
||||
'pending': [
|
||||
{ name: 'confirm-order', label: '确认订单' },
|
||||
{ name: 'edit' },
|
||||
{ name: 'move-to-top', label: 'to top' },
|
||||
{ name: 'move-up', label: 'up' },
|
||||
{ name: 'move-down', label: 'down' },
|
||||
{ name: 'move-to-bottom', label: 'to bottom' },
|
||||
{ name: 'move-up', label: '上移', icon: 'caret-top' },
|
||||
{ name: 'move-down', label: '下移', icon: 'caret-bottom' },
|
||||
{ name: 'move-to-top', label: '移至顶部', icon: 'upload2' },
|
||||
{ name: 'move-to-bottom', label: '移至底部', icon: 'download' },
|
||||
// { name: 'move-to-top', label: 'to top' },
|
||||
// { name: 'move-up', label: 'up' },
|
||||
// { name: 'move-down', label: 'down' },
|
||||
// { name: 'move-to-bottom', label: 'to bottom' },
|
||||
{ name: 'delete' },
|
||||
|
||||
],
|
||||
'finished': [
|
||||
{ name: 'view-detail', label: '查看详情' }
|
||||
// { name: 'view-detail', label: '查看详情' }
|
||||
]
|
||||
}
|
||||
|
||||
const genTableProps = (type /** ongoing, pending, finished */) =>
|
||||
[
|
||||
{ width: 80, type: 'index', label: '序号' },
|
||||
{ width: 80, type: 'index', label: '序号', fixed: true },
|
||||
{ width: 120, prop: "code", label: "订单号", fixed: 'left' },
|
||||
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||
{ width: 200, prop: "code", label: "订单号" },
|
||||
{ width: 120, prop: "statusDictValue", label: "订单状态", filter: dictFilter('order_status') }, // 不可编辑
|
||||
{ width: 200, prop: "cate", label: "子订单号" },
|
||||
{ width: 200, prop: "productCode", label: "物料编号" }, // select, filterable
|
||||
@ -71,18 +75,19 @@ export default function () {
|
||||
{ width: 200, prop: "saleNo", label: "销售订单号" },
|
||||
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" },
|
||||
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
|
||||
{ width: 80, prop: "specifications", label: "生产订单类型" },
|
||||
{ width: 120, prop: "specifications", label: "生产订单类型" },
|
||||
{ width: 120, prop: "deliveryTime", label: "发货时间" },
|
||||
{ width: 120, prop: "customerCode", label: "客户" },
|
||||
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
|
||||
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数", },
|
||||
{ width: 200, prop: "remark", label: "备注" },
|
||||
{ prop: "description", label: "详情", subcomponent: TableTextComponent },
|
||||
{
|
||||
prop: "operations",
|
||||
name: "操作",
|
||||
fixed: "right",
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: operations[type]
|
||||
options: operations[type],
|
||||
width: operations[type].length * 64
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user