|
@@ -116,8 +116,31 @@
|
|
|
<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
|
|
<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
|
|
|
<SupplierChooseForm ref="supplierChooseForm" @getSupplier="getSupplier"></SupplierChooseForm>
|
|
<SupplierChooseForm ref="supplierChooseForm" @getSupplier="getSupplier"></SupplierChooseForm>
|
|
|
<EditTradeNameForm ref="editTradeNameForm" @refreshList="refreshList"></EditTradeNameForm>
|
|
<EditTradeNameForm ref="editTradeNameForm" @refreshList="refreshList"></EditTradeNameForm>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="选择导出时间范围" :close-on-click-modal="false" draggable width="600px" append-to-body
|
|
|
|
|
+ v-model="exportVisible" @close="closeExportDialog" top="30vh">
|
|
|
|
|
+ <el-form ref="exportFormRef" :model="exportForm" label-width="160px" @submit.native.prevent>
|
|
|
|
|
+ <el-form-item label="选择导出时间范围:" prop="dateRange"
|
|
|
|
|
+ :rules="[{ required: true, type: 'array', message: '请选择导出时间范围', trigger: 'change' }]">
|
|
|
|
|
+ <el-date-picker placement="bottom-start" format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss" v-model="exportForm.dateRange" type="datetimerange"
|
|
|
|
|
+ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
|
+ <el-button @click="closeExportDialog()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="submitExport()" icon="el-icon-download"
|
|
|
|
|
+ v-noMoreClick>导出</el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -130,8 +153,8 @@ import MaterialManagementService from '@/api/psi/MaterialManagementService'
|
|
|
import WareHouseService from '@/api/psi/WareHouseService'
|
|
import WareHouseService from '@/api/psi/WareHouseService'
|
|
|
import processService from '@/api/flowable/processService'
|
|
import processService from '@/api/flowable/processService'
|
|
|
import userService from '@/api/sys/userService'
|
|
import userService from '@/api/sys/userService'
|
|
|
-import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
|
|
|
|
|
-import EditTradeNameForm from '@/views/materialManagement/wareHouseSummary/EditTradeNameForm'
|
|
|
|
|
|
|
+import SupplierChooseForm from '@/views/psiManagement/supplier/SupplierChooseForm'
|
|
|
|
|
+import EditTradeNameForm from '@/views/psiManagement/wareHouseSummary/EditTradeNameForm'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -149,6 +172,10 @@ export default {
|
|
|
supplierId: '',
|
|
supplierId: '',
|
|
|
supplierName: ''
|
|
supplierName: ''
|
|
|
},
|
|
},
|
|
|
|
|
+ exportVisible: false,
|
|
|
|
|
+ exportForm: {
|
|
|
|
|
+ dateRange: []
|
|
|
|
|
+ },
|
|
|
dataList: [],
|
|
dataList: [],
|
|
|
tablePage: {
|
|
tablePage: {
|
|
|
total: 0,
|
|
total: 0,
|
|
@@ -217,7 +244,7 @@ export default {
|
|
|
'current': this.tablePage.currentPage,
|
|
'current': this.tablePage.currentPage,
|
|
|
'size': this.tablePage.pageSize,
|
|
'size': this.tablePage.pageSize,
|
|
|
'orders': this.tablePage.orders,
|
|
'orders': this.tablePage.orders,
|
|
|
- ...this.searchForm
|
|
|
|
|
|
|
+ ...this.getSearchParams()
|
|
|
}).then((data) => {
|
|
}).then((data) => {
|
|
|
this.dataList = data.records
|
|
this.dataList = data.records
|
|
|
this.tablePage.total = data.total
|
|
this.tablePage.total = data.total
|
|
@@ -289,6 +316,31 @@ export default {
|
|
|
this.$refs.supplierChooseForm.init()
|
|
this.$refs.supplierChooseForm.init()
|
|
|
},
|
|
},
|
|
|
exportFile() {
|
|
exportFile() {
|
|
|
|
|
+ this.exportVisible = true
|
|
|
|
|
+ },
|
|
|
|
|
+ closeExportDialog() {
|
|
|
|
|
+ if (this.$refs.exportFormRef) {
|
|
|
|
|
+ this.$refs.exportFormRef.resetFields()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.exportForm = {
|
|
|
|
|
+ dateRange: []
|
|
|
|
|
+ }
|
|
|
|
|
+ this.exportVisible = false
|
|
|
|
|
+ },
|
|
|
|
|
+ getSearchParams() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...this.searchForm
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ submitExport() {
|
|
|
|
|
+ this.$refs.exportFormRef.validate((valid) => {
|
|
|
|
|
+ if (!valid) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.doExport()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ doExport() {
|
|
|
const options = {
|
|
const options = {
|
|
|
filename: `${this.moment(new Date()).format('YYYY-MM-DD')}库存数据导出`,
|
|
filename: `${this.moment(new Date()).format('YYYY-MM-DD')}库存数据导出`,
|
|
|
sheetName: '库存数据导出',
|
|
sheetName: '库存数据导出',
|
|
@@ -299,10 +351,12 @@ export default {
|
|
|
current: this.tablePage.currentPage,
|
|
current: this.tablePage.currentPage,
|
|
|
size: this.tablePage.pageSize,
|
|
size: this.tablePage.pageSize,
|
|
|
orders: this.tablePage.orders,
|
|
orders: this.tablePage.orders,
|
|
|
|
|
+ dateRange: this.exportForm.dateRange,
|
|
|
...options,
|
|
...options,
|
|
|
- ...this.searchForm
|
|
|
|
|
|
|
+ ...this.getSearchParams()
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.$utils.downloadExcel(res, options.filename)
|
|
this.$utils.downloadExcel(res, options.filename)
|
|
|
|
|
+ this.closeExportDialog()
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
this.loading = false
|