no message
							parent
							
								
									3c7f2eb212
								
							
						
					
					
						commit
						8840675dc5
					
				| 
						 | 
				
			
			@ -41,6 +41,8 @@
 | 
			
		|||
        "vue3-json-viewer": "2.2.2"
 | 
			
		||||
      },
 | 
			
		||||
      "devDependencies": {
 | 
			
		||||
        "@types/lodash": "^4.17.16",
 | 
			
		||||
        "@types/pinyin": "^2.10.2",
 | 
			
		||||
        "@vitejs/plugin-vue": "5.1.4",
 | 
			
		||||
        "@vitejs/plugin-vue-jsx": "4.0.1",
 | 
			
		||||
        "@vue/eslint-config-prettier": "^10.0.0",
 | 
			
		||||
| 
						 | 
				
			
			@ -1588,6 +1590,12 @@
 | 
			
		|||
      "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/lodash": {
 | 
			
		||||
      "version": "4.17.16",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.16.tgz",
 | 
			
		||||
      "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/minimist": {
 | 
			
		||||
      "version": "1.2.5",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.5.tgz",
 | 
			
		||||
| 
						 | 
				
			
			@ -1615,6 +1623,12 @@
 | 
			
		|||
      "resolved": "https://registry.npmmirror.com/@types/parse-json/-/parse-json-4.0.2.tgz",
 | 
			
		||||
      "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw=="
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/pinyin": {
 | 
			
		||||
      "version": "2.10.2",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/@types/pinyin/-/pinyin-2.10.2.tgz",
 | 
			
		||||
      "integrity": "sha512-jLzlRkaLRLg+lgYPjOuP3HX2cozUkhXls5GTXopsKuKJ9lDGlIAb88OoIztH6TbNUsoJnl/7e/kjaumA5IKKJg==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/eslint-plugin": {
 | 
			
		||||
      "version": "8.29.1",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,6 +49,8 @@
 | 
			
		|||
    "vue3-json-viewer": "2.2.2"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@types/lodash": "^4.17.16",
 | 
			
		||||
    "@types/pinyin": "^2.10.2",
 | 
			
		||||
    "@vitejs/plugin-vue": "5.1.4",
 | 
			
		||||
    "@vitejs/plugin-vue-jsx": "4.0.1",
 | 
			
		||||
    "@vue/eslint-config-prettier": "^10.0.0",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,27 +6,27 @@
 | 
			
		|||
 * @Copyright  友仓
 | 
			
		||||
 */
 | 
			
		||||
import {postRequest, getRequest,getDownload} from '/@/lib/axios';
 | 
			
		||||
 | 
			
		||||
import {AddressAddOrUpdateForm, AddressQueryForm,} from "/@/api/business/wms/base/address/address";
 | 
			
		||||
export const addressApi = {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询  @author  hj
 | 
			
		||||
     */
 | 
			
		||||
    queryPage: (param:object) => {
 | 
			
		||||
    queryPage: (param:AddressQueryForm) => {
 | 
			
		||||
        return postRequest('/address/queryPage', param);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 增加  @author  hj
 | 
			
		||||
     */
 | 
			
		||||
    add: (param:object) => {
 | 
			
		||||
    add: (param:AddressAddOrUpdateForm) => {
 | 
			
		||||
        return postRequest('/address/add', param);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改  @author  hj
 | 
			
		||||
     */
 | 
			
		||||
    update: (param:object) => {
 | 
			
		||||
    update: (param:AddressAddOrUpdateForm) => {
 | 
			
		||||
        return postRequest('/address/update', param);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,39 @@
 | 
			
		|||
/**
 | 
			
		||||
 * 收货单位-定义TS类型
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
//查询类型定义
 | 
			
		||||
export interface AddressQueryForm {
 | 
			
		||||
    addressId?: number;
 | 
			
		||||
    pageNum: number;
 | 
			
		||||
    pageSize: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//表格数据类型定义
 | 
			
		||||
export interface AddressTableDate {
 | 
			
		||||
    addressId: number;
 | 
			
		||||
    name: string;
 | 
			
		||||
    person: string;
 | 
			
		||||
    telephone: string;
 | 
			
		||||
    address: string;
 | 
			
		||||
    createTime: Date;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//新增或修改表单类型定义
 | 
			
		||||
export interface AddressAddOrUpdateForm {
 | 
			
		||||
    addressId?: number;
 | 
			
		||||
    name?: string;
 | 
			
		||||
    person?: string;
 | 
			
		||||
    telephone?: string;
 | 
			
		||||
    address?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//下拉查询
 | 
			
		||||
interface AddressSelect {
 | 
			
		||||
    addressId: number;
 | 
			
		||||
    name: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@
 | 
			
		|||
import {SmartLoading} from '/@/components/framework/smart-loading';
 | 
			
		||||
import {addressApi} from '/@/api/business/wms/base/address/address-api';
 | 
			
		||||
import {smartSentry} from '/@/lib/smart-sentry';
 | 
			
		||||
 | 
			
		||||
import {AddressAddOrUpdateForm} from "/@/api/business/wms/base/address/address";
 | 
			
		||||
// ------------------------ 事件 ------------------------
 | 
			
		||||
 | 
			
		||||
const emits = defineEmits(['reloadList']);
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +54,7 @@
 | 
			
		|||
// 是否显示
 | 
			
		||||
const visibleFlag = ref(false);
 | 
			
		||||
 | 
			
		||||
  function show(rowData: object) {
 | 
			
		||||
function show(rowData: AddressAddOrUpdateForm) {
 | 
			
		||||
  Object.assign(form, formDefault);
 | 
			
		||||
  if (rowData && !_.isEmpty(rowData)) {
 | 
			
		||||
    Object.assign(form, rowData);
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@
 | 
			
		|||
// 组件ref
 | 
			
		||||
const formRef = ref();
 | 
			
		||||
 | 
			
		||||
  const formDefault = {
 | 
			
		||||
const formDefault: AddressAddOrUpdateForm = {
 | 
			
		||||
  addressId: undefined, //收货地址id
 | 
			
		||||
  name: undefined, //名称/单位
 | 
			
		||||
  person: undefined, //联系人
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -97,8 +97,6 @@
 | 
			
		|||
        <template v-if="column.dataIndex === 'action'">
 | 
			
		||||
          <div class="smart-table-operate">
 | 
			
		||||
            <a-space>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
              <a-button @click="showForm(record)" type="primary" ghost style="width:60px;height: 32px"
 | 
			
		||||
                        v-privilege="'address:update'">
 | 
			
		||||
                编辑
 | 
			
		||||
| 
						 | 
				
			
			@ -170,7 +168,7 @@
 | 
			
		|||
</template>
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import {reactive, ref, onMounted} from 'vue';
 | 
			
		||||
import {message, Modal, UploadFile} from 'ant-design-vue';
 | 
			
		||||
import {message, Modal, UploadFile, TableColumnType} from 'ant-design-vue';
 | 
			
		||||
import {SmartLoading} from '/@/components/framework/smart-loading';
 | 
			
		||||
import {addressApi} from '/@/api/business/wms/base/address/address-api';
 | 
			
		||||
import {PAGE_SIZE_OPTIONS} from '/@/constants/common-const';
 | 
			
		||||
| 
						 | 
				
			
			@ -180,10 +178,17 @@ import AddressForm from '/@/views/business/wms/base/address/address-form.vue';
 | 
			
		|||
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
 | 
			
		||||
import AddressSelect from "/@/views/business/wms/base/address/address-select.vue";
 | 
			
		||||
import {fileApi} from "/@/api/support/file-api";
 | 
			
		||||
import {AddressAddOrUpdateForm, AddressQueryForm, AddressTableDate} from "/@/api/business/wms/base/address/address";
 | 
			
		||||
 | 
			
		||||
// ---------------------------- 表格列 ----------------------------
 | 
			
		||||
 | 
			
		||||
const columns = ref([
 | 
			
		||||
// ---------------------------- 表格配置 ----------------------------
 | 
			
		||||
// 表格加载loading
 | 
			
		||||
const tableLoading = ref(false);
 | 
			
		||||
// 表格数据
 | 
			
		||||
const tableData = ref(<AddressTableDate[]>[]);
 | 
			
		||||
// 总数
 | 
			
		||||
const total = ref(0);
 | 
			
		||||
//列
 | 
			
		||||
const columns = ref<TableColumnType<AddressTableDate>[]>([
 | 
			
		||||
  {
 | 
			
		||||
    title: '收货地址id',
 | 
			
		||||
    dataIndex: 'addressId',
 | 
			
		||||
| 
						 | 
				
			
			@ -224,20 +229,13 @@ const columns = ref([
 | 
			
		|||
]);
 | 
			
		||||
 | 
			
		||||
// ---------------------------- 查询数据表单和方法 ----------------------------
 | 
			
		||||
 | 
			
		||||
const queryFormState = {
 | 
			
		||||
// 查询表单form
 | 
			
		||||
const queryFormState: AddressQueryForm = {
 | 
			
		||||
  addressId: undefined, //收货单位
 | 
			
		||||
  pageNum: 1,
 | 
			
		||||
  pageSize: 10,
 | 
			
		||||
};
 | 
			
		||||
// 查询表单form
 | 
			
		||||
const queryForm = reactive({...queryFormState});
 | 
			
		||||
// 表格加载loading
 | 
			
		||||
const tableLoading = ref(false);
 | 
			
		||||
// 表格数据
 | 
			
		||||
const tableData = ref([]);
 | 
			
		||||
// 总数
 | 
			
		||||
const total = ref(0);
 | 
			
		||||
const queryForm = reactive<AddressQueryForm>({...queryFormState});
 | 
			
		||||
 | 
			
		||||
// 重置查询条件
 | 
			
		||||
function resetQuery() {
 | 
			
		||||
| 
						 | 
				
			
			@ -254,7 +252,7 @@ function onSearch() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
//选择收货单位
 | 
			
		||||
function changeAddressSelect(selectValue: any) {
 | 
			
		||||
function changeAddressSelect(selectValue: { addressId: number }) {
 | 
			
		||||
  if (selectValue) {
 | 
			
		||||
    queryForm.addressId = selectValue.addressId;
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -275,18 +273,16 @@ async function queryData() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
onMounted(queryData);
 | 
			
		||||
 | 
			
		||||
// ---------------------------- 添加/修改 ----------------------------
 | 
			
		||||
const formRef = ref();
 | 
			
		||||
 | 
			
		||||
function showForm(data: object) {
 | 
			
		||||
function showForm(data: AddressAddOrUpdateForm) {
 | 
			
		||||
  formRef.value.show(data);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ---------------------------- 单个删除 ----------------------------
 | 
			
		||||
//确认删除
 | 
			
		||||
function onDelete(data: object) {
 | 
			
		||||
function onDelete(data: AddressTableDate) {
 | 
			
		||||
  Modal.confirm({
 | 
			
		||||
    title: '提示',
 | 
			
		||||
    content: '确定要删除选吗?',
 | 
			
		||||
| 
						 | 
				
			
			@ -302,7 +298,7 @@ function onDelete(data: object) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
//请求删除
 | 
			
		||||
async function requestDelete(data: any) {
 | 
			
		||||
async function requestDelete(data:AddressTableDate) {
 | 
			
		||||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    await addressApi.delete(data.addressId);
 | 
			
		||||
| 
						 | 
				
			
			@ -318,9 +314,9 @@ async function requestDelete(data: any) {
 | 
			
		|||
// ---------------------------- 批量删除 ----------------------------
 | 
			
		||||
 | 
			
		||||
// 选择表格行
 | 
			
		||||
const selectedRowKeyList = ref([]);
 | 
			
		||||
const selectedRowKeyList = ref<number[]>([]);
 | 
			
		||||
 | 
			
		||||
function onSelectChange(selectedRowKeys: any) {
 | 
			
		||||
function onSelectChange(selectedRowKeys: number[]) {
 | 
			
		||||
  selectedRowKeyList.value = selectedRowKeys;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -347,6 +343,7 @@ async function requestBatchDelete() {
 | 
			
		|||
    await addressApi.batchDelete(selectedRowKeyList.value);
 | 
			
		||||
    message.success('删除成功');
 | 
			
		||||
    await queryData();
 | 
			
		||||
    selectedRowKeyList.value = [];
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
    smartSentry.captureError(e);
 | 
			
		||||
  } finally {
 | 
			
		||||
| 
						 | 
				
			
			@ -406,8 +403,13 @@ async function onImportAddress() {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await addressApi.importAddress(formData);
 | 
			
		||||
    const {success} = JSON.parse(response.msg);
 | 
			
		||||
    const {success, error} = JSON.parse(response.data);
 | 
			
		||||
    if (success) {
 | 
			
		||||
      message.success(success);
 | 
			
		||||
    }
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
    importModalShowFlag.value = false;
 | 
			
		||||
    await queryData();
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
| 
						 | 
				
			
			@ -421,4 +423,7 @@ async function onImportAddress() {
 | 
			
		|||
function onExportAddress() {
 | 
			
		||||
  addressApi.exportAddress();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
onMounted(queryData);
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,6 +25,8 @@
 | 
			
		|||
<script setup lang="ts">
 | 
			
		||||
import {onMounted, ref, watch} from 'vue';
 | 
			
		||||
import {addressApi} from "/@/api/business/wms/base/address/address-api";
 | 
			
		||||
import {AddressSelect} from "/@/api/business/wms/base/address/address";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  value: [Number, String, Object, Array],
 | 
			
		||||
| 
						 | 
				
			
			@ -50,7 +52,8 @@ const props = defineProps({
 | 
			
		|||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const addressList = ref([]);
 | 
			
		||||
const addressList = ref<AddressSelect[]>([]);
 | 
			
		||||
const selectValue = ref(props.value);
 | 
			
		||||
 | 
			
		||||
async function queryData() {
 | 
			
		||||
  let res = await addressApi.queryAddress({});
 | 
			
		||||
| 
						 | 
				
			
			@ -59,8 +62,6 @@ async function queryData() {
 | 
			
		|||
 | 
			
		||||
const emit = defineEmits(['update:value', 'change']);
 | 
			
		||||
 | 
			
		||||
const selectValue = ref(props.value);
 | 
			
		||||
 | 
			
		||||
// 箭头value变化
 | 
			
		||||
watch(
 | 
			
		||||
    () => props.value,
 | 
			
		||||
| 
						 | 
				
			
			@ -69,19 +70,20 @@ watch(
 | 
			
		|||
    }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function handleChange(value: any) {
 | 
			
		||||
  let selectedAddress: any[] | any;
 | 
			
		||||
function getSelectedAddress(value: number | number[] | undefined): AddressSelect | AddressSelect[] | undefined {
 | 
			
		||||
  if (Array.isArray(value)) {
 | 
			
		||||
    // 多选情况
 | 
			
		||||
    selectedAddress = value.map((id) => addressList.value.find((item: any) => item.addressId === id)).filter(Boolean);
 | 
			
		||||
    return value
 | 
			
		||||
        .map(id => addressList.value.find(item => item.addressId === id))
 | 
			
		||||
        .filter((item): item is AddressSelect => Boolean(item));
 | 
			
		||||
  } else {
 | 
			
		||||
    // 单选情况
 | 
			
		||||
    selectedAddress = addressList.value.find((item: any) => item.addressId === value);
 | 
			
		||||
    return addressList.value.find(item => item.addressId === value);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function handleChange(value: number | number[] | undefined) {
 | 
			
		||||
  const selectedAddress = getSelectedAddress(value);
 | 
			
		||||
  emit('update:value', value);
 | 
			
		||||
  emit('change', selectedAddress);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,7 @@
 | 
			
		|||
        </a-col>
 | 
			
		||||
        <a-col :span="12">
 | 
			
		||||
          <a-form-item label="物料类型" name="itemType">
 | 
			
		||||
            <DictSelect width="100%" :dict-code="'ITEM_TYPE'" v-model:value="form.unit"  />
 | 
			
		||||
            <DictSelect width="100%" :dict-code="'ITEM_TYPE'" v-model:value="form.itemType"  />
 | 
			
		||||
          </a-form-item>
 | 
			
		||||
        </a-col>
 | 
			
		||||
      </a-row>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -452,8 +452,13 @@ async function onImportItems() {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await itemApi.importItems(formData);
 | 
			
		||||
    const {success} = JSON.parse(response.msg);
 | 
			
		||||
    const {success, error} = JSON.parse(response.data);
 | 
			
		||||
    if (success) {
 | 
			
		||||
      message.success(success);
 | 
			
		||||
    }
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
    importModalShowFlag.value = false;
 | 
			
		||||
    await queryData();
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -536,8 +536,13 @@ async function onImportLocations() {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await locationApi.importLocations(formData);
 | 
			
		||||
    const {success} = JSON.parse(response.msg);
 | 
			
		||||
    const {success, error} = JSON.parse(response.data);
 | 
			
		||||
    if (success) {
 | 
			
		||||
      message.success(success);
 | 
			
		||||
    }
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
    importModalShowFlag.value = false;
 | 
			
		||||
    await queryData();
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -467,8 +467,13 @@ async function onImportStocks() {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await stockApi.importStocks(formData);
 | 
			
		||||
    const {success} = JSON.parse(response.msg);
 | 
			
		||||
    const {success, error} = JSON.parse(response.data);
 | 
			
		||||
    if (success) {
 | 
			
		||||
      message.success(success);
 | 
			
		||||
    }
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
    importModalShowFlag.value = false;
 | 
			
		||||
    await queryData();
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -109,20 +109,19 @@
 | 
			
		|||
 | 
			
		||||
        <template v-if="column.dataIndex === 'action'">
 | 
			
		||||
          <div class="smart-table-operate">
 | 
			
		||||
            <a-button @click="showForm(record)" type="link" v-privilege="'asn:update'">
 | 
			
		||||
              <template #icon>
 | 
			
		||||
                <EditOutlined/>
 | 
			
		||||
              </template>
 | 
			
		||||
            <a-space>
 | 
			
		||||
              <a-button @click="showForm(record)" type="primary" ghost style="width:60px;height: 32px"
 | 
			
		||||
                        v-privilege="'asn:update'">
 | 
			
		||||
 | 
			
		||||
                编辑
 | 
			
		||||
              </a-button>
 | 
			
		||||
            <a-button @click="onDelete(record)" danger type="link"
 | 
			
		||||
              <a-button @click="onDelete(record)" type="primary" danger ghost style="width:60px;height: 32px"
 | 
			
		||||
                        :disabled="record.orderQuantity>0 && record.orderQuantity-record.receivedQuantity==0"
 | 
			
		||||
                        v-privilege="'asn:delete'">
 | 
			
		||||
              <template #icon>
 | 
			
		||||
                <DeleteOutlined/>
 | 
			
		||||
              </template>
 | 
			
		||||
 | 
			
		||||
                删除
 | 
			
		||||
              </a-button>
 | 
			
		||||
            </a-space>
 | 
			
		||||
          </div>
 | 
			
		||||
        </template>
 | 
			
		||||
      </template>
 | 
			
		||||
| 
						 | 
				
			
			@ -220,9 +219,9 @@ const columns = ref([
 | 
			
		|||
  {
 | 
			
		||||
    title: '操作',
 | 
			
		||||
    dataIndex: 'action',
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    fixed: 'right',
 | 
			
		||||
    width: 140,
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    width: 150,
 | 
			
		||||
  },
 | 
			
		||||
]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -117,7 +117,7 @@ async function save() {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await receiveApi.batchReceive(form);
 | 
			
		||||
    const {error, success} = JSON.parse(response.msg);
 | 
			
		||||
    const {error, success} = JSON.parse(response.data);
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -242,7 +242,7 @@ async function requestDelete(data: any) {
 | 
			
		|||
  SmartLoading.show();
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await asnDetailApi.delete(data.asnDetailId);
 | 
			
		||||
    const {error, success} = JSON.parse(response.msg);
 | 
			
		||||
    const {error, success} = JSON.parse(response.data);
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -278,7 +278,7 @@ async function requestBatchDelete() {
 | 
			
		|||
  try {
 | 
			
		||||
    SmartLoading.show();
 | 
			
		||||
    const response = await asnDetailApi.batchDelete(selectedRowKeyList.value);
 | 
			
		||||
    const {error, success} = JSON.parse(response.msg);
 | 
			
		||||
    const {error, success} = JSON.parse(response.data);
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -196,7 +196,7 @@ async function requestBatchReturn() {
 | 
			
		|||
      taskIds: selectedRowKeyList.value,
 | 
			
		||||
    };
 | 
			
		||||
    const response = await receiveApi.batchReturn(param);
 | 
			
		||||
    const {error, success} = JSON.parse(response.msg);
 | 
			
		||||
    const {error, success} = JSON.parse(response.data);
 | 
			
		||||
    if (error) {
 | 
			
		||||
      message.error(error);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue