update
This commit is contained in:
parent
15978f6055
commit
6ccfef90f6
@ -317,7 +317,14 @@ export default {
|
|||||||
.get(this.urls.base + `/${this.dataForm.id}`)
|
.get(this.urls.base + `/${this.dataForm.id}`)
|
||||||
.then(({ data: res }) => {
|
.then(({ data: res }) => {
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
if (res.data) this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
||||||
|
else {
|
||||||
|
this.$message({
|
||||||
|
message: '后端返回的数据为 null',
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
/** 格式化文件上传列表 */
|
/** 格式化文件上传列表 */
|
||||||
if (Array.isArray(this.dataForm.files)) {
|
if (Array.isArray(this.dataForm.files)) {
|
||||||
this.dataForm.files = this.dataForm.files.map((file) => ({
|
this.dataForm.files = this.dataForm.files.map((file) => ({
|
||||||
|
@ -293,6 +293,11 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "view-car-record": {
|
||||||
|
// 查看窑车历史记录 - from 托盘页面
|
||||||
|
this.openDialog(data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "status": {
|
case "status": {
|
||||||
console.log("status", data);
|
console.log("status", data);
|
||||||
// TODO: 类似于这种字符串,可以统一集中到一个文件里
|
// TODO: 类似于这种字符串,可以统一集中到一个文件里
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import { timeFilter, dictFilter } from "@/utils/filters";
|
import { timeFilter, dictFilter } from "@/utils/filters";
|
||||||
|
import { getDictDataList } from '@/utils';
|
||||||
|
|
||||||
|
|
||||||
// import StateSelect from '@/components/StateSelect.vue';
|
// import StateSelect from '@/components/StateSelect.vue';
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ export default function () {
|
|||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "print", label: "打印", icon: "printer" },
|
{ name: "print", label: "打印", icon: "printer" },
|
||||||
{ name: "view-car-record", label: "窑车记录", emitFull: true, icon: "shopping-cart-1" },
|
{ name: "view-car-record", label: "窑车记录", emitField: 'hisId', icon: "shopping-cart-1" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -58,7 +60,51 @@ export default function () {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const dialogJustFormConfigs = null;
|
const dialogJustFormConfigs = {
|
||||||
|
form: {
|
||||||
|
rows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
select: true,
|
||||||
|
label: "窑车号",
|
||||||
|
prop: "carId",
|
||||||
|
options: [],
|
||||||
|
fetchData: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }),
|
||||||
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
|
elparams: {
|
||||||
|
fliterable: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
select: true,
|
||||||
|
label: "状态",
|
||||||
|
prop: "stateDictValue",
|
||||||
|
options: getDictDataList('car_state').map(i => ({ label: i.dictLabel, value: i.dictValue })),
|
||||||
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
|
elparams: {
|
||||||
|
fliterable: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// select: true,
|
||||||
|
input: true,
|
||||||
|
label: "位置",
|
||||||
|
prop: "pos",
|
||||||
|
// options: getDictDataList(),
|
||||||
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
|
// elparams: {
|
||||||
|
// fliterable: true
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
operations: [
|
||||||
|
// { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
|
||||||
|
// { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
|
||||||
|
// { name: "reset", label: "重置", type: "warning", showAlways: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const carPayloadDialogConfigs = {
|
const carPayloadDialogConfigs = {
|
||||||
dialogWidth: '70%',
|
dialogWidth: '70%',
|
||||||
@ -98,8 +144,10 @@ export default function () {
|
|||||||
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||||
},
|
},
|
||||||
urls: {
|
urls: {
|
||||||
|
base: '/pms/carHistory',
|
||||||
page: "/pms/pallet/pageView",
|
page: "/pms/pallet/pageView",
|
||||||
pageIsPostApi: true,
|
pageIsPostApi: true,
|
||||||
|
printLog: '/pms/pallet/print', // post
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
/** { pos: [] } **/
|
/** { pos: [] } **/
|
||||||
]"
|
]"
|
||||||
:trigger-update="triggerUpdateKey"
|
:trigger-update="triggerUpdateKey"
|
||||||
:car-payload-dialog-configs="carPayloadDialogConfigs"
|
|
||||||
/>
|
/>
|
||||||
|
<!-- :car-payload-dialog-configs="carPayloadDialogConfigs" -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -24,9 +24,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const { tableConfig, headFormConfigs, urls, carPayloadDialogConfigs, dialogConfigs } = initConfig.call(this);
|
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
|
||||||
return {
|
return {
|
||||||
carPayloadDialogConfigs,
|
|
||||||
tableConfig,
|
tableConfig,
|
||||||
headFormConfigs,
|
headFormConfigs,
|
||||||
allUrls: urls,
|
allUrls: urls,
|
||||||
|
Loading…
Reference in New Issue
Block a user