|
@@ -1,86 +1,89 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <!-- 停用仓库信息-->
|
|
|
|
|
- <a-modal class="commonModal warehouse-disable"
|
|
|
|
|
- title="停用仓库信息"
|
|
|
|
|
- v-model:visible="visible"
|
|
|
|
|
- centered
|
|
|
|
|
- :maskClosable="maskClosableFlag"
|
|
|
|
|
- @cancel="cancel"
|
|
|
|
|
- width="890px">
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <a-button key="cancel"
|
|
|
|
|
- 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>
|
|
|
|
|
|
|
+ <!-- 停用仓库信息-->
|
|
|
|
|
+ <a-modal class="commonModal warehouse-disable"
|
|
|
|
|
+ title="停用仓库信息"
|
|
|
|
|
+ v-model:visible="visible"
|
|
|
|
|
+ centered
|
|
|
|
|
+ :maskClosable="maskClosableFlag"
|
|
|
|
|
+ @cancel="cancel"
|
|
|
|
|
+ width="890px">
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <a-button key="cancel"
|
|
|
|
|
+ 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>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import {defineComponent, PropType, ref} from 'vue';
|
|
|
|
|
-import {closeModal} from '@/common/setup/modal/index';
|
|
|
|
|
-import {stopOrResumeWarehouse, wareType} from "@/views/information/warehouse-info/compoments/setup";
|
|
|
|
|
-import {ErmcpWareHouseInfo} from "@/services/go/ermcp/warehouse-info/interface";
|
|
|
|
|
-import {message, Modal} from "ant-design-vue";
|
|
|
|
|
-import {gerWareHouseStatusName, getWareHouseTypeName} from "@/views/information/warehouse-info/setup";
|
|
|
|
|
-import {formatValue} from "@/common/methods";
|
|
|
|
|
|
|
+import { defineComponent, PropType, ref } from 'vue';
|
|
|
|
|
+import { closeModal } from '@/common/setup/modal/index';
|
|
|
|
|
+import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
|
|
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
|
|
+import { gerWareHouseStatusName, getWareHouseTypeName } from '@/views/information/warehouse-info/setup';
|
|
|
|
|
+import { formatValue } from '@/common/methods';
|
|
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { getSelectedAccountId } from '@/services/bus/account';
|
|
|
|
|
+import { WarehouseStateChangeReq } from '@/services/proto/warehouse/interface';
|
|
|
|
|
+import { warehouseStateChangeReq } from '@/services/proto/warehouse';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'warehouse_info_btn_disable',
|
|
name: 'warehouse_info_btn_disable',
|
|
@@ -92,9 +95,9 @@ export default defineComponent({
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
- const {visible, cancel} = closeModal('warehouse_info_btn_disable');
|
|
|
|
|
|
|
+ const { visible, cancel } = closeModal('warehouse_info_btn_disable');
|
|
|
const maskClosableFlag = ref<boolean>(false);
|
|
const maskClosableFlag = ref<boolean>(false);
|
|
|
- const {loading, changeStatus} = stopOrResumeWarehouse(wareType.stop);
|
|
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
|
|
|
function submit() {
|
|
function submit() {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
@@ -104,16 +107,16 @@ export default defineComponent({
|
|
|
cancelText: '取消',
|
|
cancelText: '取消',
|
|
|
onOk() {
|
|
onOk() {
|
|
|
console.log('OK');
|
|
console.log('OK');
|
|
|
- changeStatus(props.selectedRow.autoid)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
-
|
|
|
|
|
- message.success(res)
|
|
|
|
|
- context.emit('refresh')
|
|
|
|
|
- cancel()
|
|
|
|
|
- })
|
|
|
|
|
- .catch(err => {
|
|
|
|
|
- message.error(err)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const accountid = getSelectedAccountId()?.toNumber();
|
|
|
|
|
+ const req: WarehouseStateChangeReq = {
|
|
|
|
|
+ accountid: accountid === undefined ? 0 : accountid,
|
|
|
|
|
+ warehouseid: props.selectedRow.autoid,
|
|
|
|
|
+ warehousestatus: 2,
|
|
|
|
|
+ };
|
|
|
|
|
+ requestResultLoadingAndInfo(warehouseStateChangeReq, req, loading, ['停用仓库成功', '停用仓库失败:']).then(() => {
|
|
|
|
|
+ context.emit('refresh');
|
|
|
|
|
+ cancel();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
onCancel() {
|
|
onCancel() {
|
|
|
console.log('Cancel');
|
|
console.log('Cancel');
|