|
|
@@ -1,100 +1,134 @@
|
|
|
<template>
|
|
|
- <!-- 恢复仓库信息-->
|
|
|
- <a-modal class="modify-custom"
|
|
|
- title="恢复仓库信息"
|
|
|
- v-model:visible="visible"
|
|
|
- centered
|
|
|
- :maskClosable="maskClosableFlag"
|
|
|
- @cancel="cancel"
|
|
|
- width="890px">
|
|
|
- <template #footer>
|
|
|
- <a-button key="submit"
|
|
|
- class="cancelBtn"
|
|
|
- @click="cancel">取消</a-button>
|
|
|
- <a-button key="submit"
|
|
|
- type="primary"
|
|
|
- :loading="loading"
|
|
|
- @click="submit">确认恢复</a-button>
|
|
|
- </template>
|
|
|
- <a-form class="inlineForm"
|
|
|
- :form="form"
|
|
|
- @submit="handleSearch">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="仓库类型">
|
|
|
- <span class="white">{{ getWareHouseTypeName(selectedRow.warehousetype) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="仓库名称">
|
|
|
- <span class="white">{{ formatValue(selectedRow.warehousename)}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="仓库简称">
|
|
|
- <span class="white">{{ formatValue(selectedRow.warehousecode) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="联系人">
|
|
|
- <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="联系电话">
|
|
|
- <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="状态">
|
|
|
- <span class="red">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="所在地区">
|
|
|
- <span class="white">{{ formatValue(selectedRow.address) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="详细地址">
|
|
|
- <span class="white">{{ formatValue(selectedRow.address) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </a-modal>
|
|
|
+ <!-- 恢复仓库信息-->
|
|
|
+ <a-modal class="modify-custom"
|
|
|
+ title="恢复仓库信息"
|
|
|
+ v-model:visible="visible"
|
|
|
+ centered
|
|
|
+ :maskClosable="maskClosableFlag"
|
|
|
+ @cancel="cancel"
|
|
|
+ width="890px">
|
|
|
+ <template #footer>
|
|
|
+ <a-button key="submit"
|
|
|
+ class="cancelBtn"
|
|
|
+ @click="cancel">取消
|
|
|
+ </a-button>
|
|
|
+ <a-button key="submit"
|
|
|
+ type="primary"
|
|
|
+ :loading="loading"
|
|
|
+ @click="submit">确认恢复
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <a-form class="inlineForm"
|
|
|
+ :form="form"
|
|
|
+ @submit="handleSearch">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="仓库类型">
|
|
|
+ <span class="white">{{ getWareHouseTypeName(selectedRow.warehousetype) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="仓库名称">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="仓库简称">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.warehousecode) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="联系人">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="联系电话">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="所在地区">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.address) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="详细地址">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.address) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref } from 'vue';
|
|
|
-import { closeModal } from '@/common/setup/modal/index';
|
|
|
+import {defineComponent, PropType, ref} from 'vue';
|
|
|
+import {closeModal} from '@/common/setup/modal/index';
|
|
|
+import {ErmcpWareHouseInfo} from "@/services/go/ermcp/warehouse-info/interface";
|
|
|
+import {stopOrResumeWarehouse, wareType} from "@/views/information/warehouse-info/compoments/setup";
|
|
|
+import {message, Modal} from "ant-design-vue";
|
|
|
+import {gerWareHouseStatusName, getWareHouseTypeName} from "@/views/information/warehouse-info/setup";
|
|
|
+import {formatValue} from "@/common/methods";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'warehouse_info_btn_recover',
|
|
|
components: {},
|
|
|
- setup() {
|
|
|
- const { visible, cancel } = closeModal('warehouse_info_btn_recover');
|
|
|
- const loading = ref<boolean>(false);
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<ErmcpWareHouseInfo>,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ const {visible, cancel} = closeModal('warehouse_info_btn_recover');
|
|
|
+ const {loading, changeStatus} = stopOrResumeWarehouse(wareType.normal);
|
|
|
const maskClosableFlag = ref<boolean>(false);
|
|
|
+
|
|
|
function submit() {
|
|
|
loading.value = true;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- cancel();
|
|
|
- }, 2000);
|
|
|
+ Modal.confirm({
|
|
|
+ title: '是否确认恢复仓库信息',
|
|
|
+ okText: '确认恢复',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ console.log('OK');
|
|
|
+ changeStatus(props.selectedRow.autoid)
|
|
|
+ .then(res => {
|
|
|
+ message.success(res)
|
|
|
+ context.emit('refresh')
|
|
|
+ cancel()
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ message.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ console.log('Cancel');
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
return {
|
|
|
visible,
|
|
|
cancel,
|
|
|
submit,
|
|
|
loading,
|
|
|
maskClosableFlag,
|
|
|
+ gerWareHouseStatusName,
|
|
|
+ getWareHouseTypeName,
|
|
|
+ formatValue,
|
|
|
};
|
|
|
},
|
|
|
});
|