姜旭之
1 year ago
16 changed files with 267 additions and 248 deletions
Binary file not shown.
@ -0,0 +1,8 @@ |
|||||
|
const options1 = [ |
||||
|
{ value: 1, label: "正常" }, |
||||
|
{ value: 2, label: "报废" }, |
||||
|
{ value: 3, label: "提交" }, |
||||
|
]; |
||||
|
|
||||
|
const invoiceState = { title: "发票状态", type: "string", input: "select", options: options1 }; |
||||
|
export default invoiceState; |
@ -1,15 +1,52 @@ |
|||||
import AppList from "../../../components/list/index.js"; |
import AppList from "../../../components/list/index.js"; |
||||
import html from "html"; |
import html from "html"; |
||||
import useConfig from "../../../models/inventory/log.js"; |
import useConfig from "../../../models/inventory/log.js"; |
||||
|
import { reactive, ref } from "vue"; |
||||
|
import request from "../../request/index.js"; |
||||
|
import { schemaToModel } from "../../utils/index.js"; |
||||
|
|
||||
export default { |
export default { |
||||
components: { AppList }, |
components: { AppList }, |
||||
template: html`<app-list :config="config" @command="onCommand" />`, |
template: html`<app-list :config="config" @command="onCommand" />
|
||||
|
<el-dialog v-model="dialog" width="45%" title="补货数据导出"> |
||||
|
<el-form :model="exportModel" style="height:100%;"> |
||||
|
<el-form-item label="" label-width="100px"> |
||||
|
开始时间<el-date-picker v-model="exportModel.startDatetime" value-format="YYYY-MM-DD" /> |
||||
|
<span style="margin:0 .5em;">-</span> |
||||
|
结束时间<el-date-picker v-model="exportModel.endDatetime" value-format="YYYY-MM-DD" /> |
||||
|
</el-form-item> |
||||
|
<el-button type="primary" @click="openDialog" style="margin-left: 10px;">确定</el-button> |
||||
|
</el-form> |
||||
|
</el-dialog> `, |
||||
setup() { |
setup() { |
||||
|
const defaultExportModel = { |
||||
|
startDatetime: "", |
||||
|
endDatetime: "", |
||||
|
}; |
||||
|
const exportModel = ref(defaultExportModel); |
||||
const config = useConfig(); |
const config = useConfig(); |
||||
|
const dialog = ref(false); |
||||
|
const prop = ref(""); |
||||
|
const queryModel = ref(schemaToModel(config.query.schema)); |
||||
|
function buildQuery() { |
||||
|
const postData = JSON.parse(JSON.stringify(queryModel.value)); |
||||
|
return postData; |
||||
|
} |
||||
|
const openDialog = async () => { |
||||
|
// const url =
|
||||
|
// const method =
|
||||
|
// const postData = buildQuery();
|
||||
|
const response = await request(url, postData, { method }); |
||||
|
if (!response.errors) { |
||||
|
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`)); |
||||
|
} |
||||
|
dialog.value = false; |
||||
|
}; |
||||
const onCommand = async (item, rows) => { |
const onCommand = async (item, rows) => { |
||||
|
prop.value = item.path; |
||||
|
dialog.value = true; |
||||
console.log(item.path, item, rows); |
console.log(item.path, item, rows); |
||||
}; |
}; |
||||
return { config, onCommand }; |
return { config, onCommand, dialog, prop, exportModel, openDialog }; |
||||
}, |
}, |
||||
}; |
}; |
||||
|
Loading…
Reference in new issue