初次对接

This commit is contained in:
2025-03-27 23:36:30 +08:00
parent 55aac6feb2
commit db1fdc5e18
13 changed files with 515 additions and 267 deletions

View File

@@ -48,7 +48,7 @@ import { initBackEndControlRoutes } from '/@/router/backEnd';
import { Session } from '/@/utils/storage';
import { formatAxis } from '/@/utils/formatTime';
import { NextLoading } from '/@/utils/loading';
import { useLoginApi } from '../../../api/login/index'
// 定义变量内容
const { t } = useI18n();
const storesThemeConfig = useThemeConfig();
@@ -58,8 +58,8 @@ const router = useRouter();
const state = reactive({
isShowPassword: false,
ruleForm: {
userName: 'admin',
password: '123456',
userName: 'abc',
password: '123',
code: '1234',
},
loading: {
@@ -72,23 +72,32 @@ const currentTime = computed(() => {
return formatAxis(new Date());
});
// 登录
const onSignIn = async () => {
const onSignIn = () => {
state.loading.signIn = true;
// 存储 token 到浏览器缓存
Session.set('token', Math.random().toString(36).substr(0));
// 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
Cookies.set('userName', state.ruleForm.userName);
if (!themeConfig.value.isRequestRoutes) {
// 前端控制路由2、请注意执行顺序
const isNoPower = await initFrontEndControlRoutes();
signInSuccess(isNoPower);
} else {
// 模拟后端控制路由isRequestRoutes 为 true则开启后端控制路由
// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
const isNoPower = await initBackEndControlRoutes();
// 执行完 initBackEndControlRoutes再执行 signInSuccess
signInSuccess(isNoPower);
}
useLoginApi().login({
userName: state.ruleForm.userName,
passWord: state.ruleForm.password,
}).then( async (res:any) => {
console.log(res)
if(res.data !== null){
// 存储 token 到浏览器缓存
Session.set('token', res.data);
// 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
Cookies.set('userName', state.ruleForm.userName);
if (!themeConfig.value.isRequestRoutes) {
// 前端控制路由2、请注意执行顺序
const isNoPower = await initFrontEndControlRoutes();
signInSuccess(isNoPower);
} else {
// 模拟后端控制路由isRequestRoutes 为 true则开启后端控制路由
// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
const isNoPower = await initBackEndControlRoutes();
// 执行完 initBackEndControlRoutes再执行 signInSuccess
signInSuccess(isNoPower);
}
}
})
};
// 登录成功后的跳转
const signInSuccess = (isNoPower: boolean | undefined) => {

View File

@@ -1,10 +1,19 @@
<template>
<div class="system-user-container layout-padding">
<el-card class="layout-padding-auto" shadow="hover">
<avue-crud ref="crudRef" :data="state.data" :option="state.option" v-model:page="state.page">
<avue-crud
ref="crudRef"
:data="state.data"
:option="state.option"
v-model:page="state.page"
v-model:search="state.formData"
@on-load="onLoadFun"
@search-change="searchChange"
@search-reset="resetChange"
>
<template #menu>
<div class="btnList">
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails">查看详情</el-button>
<!-- <el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails">查看详情</el-button>-->
<el-button type="text" icon="el-icon-pie-chart" @click="state.selectedDataShow = true">查看单据</el-button>
</div>
</template>
@@ -19,9 +28,9 @@ import { reactive, onMounted,computed } from 'vue';
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n';
import selectedData from './selectedData.vue'
import {listApi} from "/@/api/list";
const router = useRouter()
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { locale, t } = useI18n();
const { t } = useI18n();
// 定义变量内容
const state = reactive({
@@ -41,56 +50,59 @@ const state = reactive({
searchMenuSpan:6,
addBtn:false,
column: [
{ label: computed(() => t('message.list.PONumber2')), prop: 'FBillNo', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierCode2')), prop: 'FSupplierId', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierName2')), prop: 'FSupplyName', width: 200,search: true },
{ label: '采购订单号', prop: 'purchaseOrderFBillNo', width: 200,search: true },
{ label: '发货单号', prop: 'sheet', width: 200,search: true },
{ label: computed(() => t('message.list.PONumber2')), prop: 'fBillNo', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierCode2')), prop: 'supplierId', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierName2')), prop: 'supplierName', width: 200,search: true },
{ label: computed(() => t('message.list.Buyer2')), prop: 'FPurchaserId', width: 200,search: true },
{ label: computed(() => t('message.list.ReceiveOrg')), prop: 'FStockOrgId', width: 200,search: true },
{ label: computed(() => t('message.list.BusinessType')), prop: 'FBillTypeID', width: 200,search: true },
{ label: computed(() => t('message.list.OrderCreator')), prop: 'FCreatorId', width: 200,search: true },
// { label: computed(() => t('message.list.ReceiveOrg')), prop: 'FStockOrgId', width: 200,search: true },
// { label: computed(() => t('message.list.BusinessType')), prop: 'FBillTypeID', width: 200,search: true },
// { label: computed(() => t('message.list.OrderCreator')), prop: 'FCreatorId', width: 200,search: true },
{ label: computed(() => t('message.list.DocStatus2')), prop: 'FDocumentStatus', width: 200,search: true },
{ label: computed(() => t('message.list.ReceivingDate')), prop: 'FDate', width: 200,search: true,type: 'datetime', searchSpan: 12,searchRange: true,},
{ label: computed(() => t('message.list.Comments3')), prop: 'FRemarks', width: 200 },
{ label: computed(() => t('message.list.ReceivingDate')), prop: 'fDate', width: 200,search: true,type: 'datetime', searchSpan: 12,searchRange: true,},
// { label: computed(() => t('message.list.Comments3')), prop: 'FRemarks', width: 200 },
],
},
data: [
{
FBillNo: '005828',
FSupplierId: '005828',
FSupplyName: '美塞斯',
FPurchaserId: '采购甲',
FStockOrgId: '不知道',
FBillTypeID:'111',
FCreatorId: '制单人甲',
FDate: '2050/10/31',
FDocumentStatus: '已验收',
FRemarks: '数据是假的',
},
],
selectedDataShow:false
data: [],
selectedDataShow:false,
formData:{}
});
const toPurchaseDetails = () => {
router.push({
path: '/materialReceiptNoticePurchaseDetails',
})
}
const onLoadFun = (e:any) => {
state.page.currentPage = e.currentPage
state.page.pageSize = e.pageSize
getList()
}
const searchChange = (params:any, done:any) => {
console.log(params)
done()
if(params.fDate?.length){
console.log(11111)
}
}
const resetChange = () => {
}
const getList = () => {
listApi().invoiceOrderGetPageList({
...state.formData,
pageSize:state.page.pageSize,
page:state.page.currentPage,
}).then((res:any) => {
if(res.resultCode === 0){
state.data = res.data.dataList
state.page.total = res.data.total
}
})
}
// 页面加载时
onMounted(() => {
for (let i = 0; i < 9; i++){
state.data.push({
FBillNo: '005828',
FSupplierId: '005828',
FSupplyName: '美塞斯',
FPurchaserId: '采购甲',
FStockOrgId: '不知道',
FBillTypeID:'111',
FCreatorId: '制单人甲',
FDate: '2050/10/31',
FDocumentStatus: '已验收',
FRemarks: '数据是假的',
},)
}
getList()
});
</script>

View File

@@ -1,9 +1,21 @@
<template>
<div class="system-user-container layout-padding">
<el-card class="layout-padding-auto" shadow="hover">
<avue-crud ref="crudRef" :data="state.data" :option="state.option" v-model:page="state.page">
<template #menu>
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails">查看</el-button>
<avue-crud
ref="crudRef"
:data="state.data"
:option="state.option"
v-model:page="state.page"
v-model:search="state.formData"
@on-load="onLoadFun"
@search-change="searchChange"
@search-reset="resetChange"
>
<template #status>
<div>未发货</div>
</template>
<template #menu="{row}">
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails(row)">查看</el-button>
</template>
</avue-crud>
</el-card>
@@ -11,12 +23,16 @@
</template>
<script lang="ts" setup>
import {reactive, onMounted, computed} from 'vue';
import {reactive, onMounted, computed,defineProps} from 'vue';
import { formatTime } from '../../utils/index'
import { useRouter } from 'vue-router'
import { listApi } from '../../api/list/index'
import { useI18n } from 'vue-i18n';
const { locale, t } = useI18n();
const router = useRouter()
const props = defineProps({
})
// 定义变量内容
const state = reactive({
page: {
@@ -31,68 +47,68 @@ const state = reactive({
delBtn: false,
editBtn: false,
align: 'center',
searchLabelWidth:130,
searchLabelWidth:100,
searchMenuSpan:6,
addBtn:false,
column: [
{ label: computed(() => t('message.list.PONumber')), prop: 'FBillNo', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierCode')), prop: 'FSupplierId', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierName')), prop: 'FSupplyName', width: 200,search: true },
{ label: computed(() => t('message.list.Buyer')), prop: 'FPurchaserId', width: 200,search: true },
{ label: computed(() => t('message.list.SettlementMode')), prop: 'FSettleModeId', width: 200,search: true },
{ label: computed(() => t('message.list.Currency')), prop: 'FSettleCurrId', width: 200,search: true },
{ label: computed(() => t('message.list.PaymentTerms')), prop: 'FPayConditionId', width: 200,search: true },
{ label: computed(() => t('message.list.ExchangeRateType')), prop: 'FExchangeTypeId', width: 200 },
{ label: computed(() => t('message.list.ExchangeRate')), prop: 'FExchangeRate', width: 200 },
{ label: computed(() => t('message.list.OrderCreater')), prop: 'FCreatorId', width: 200,search: true },
{ label: computed(() => t('message.list.DocStatus')), prop: 'FDocumentStatus', width: 200,search: true },
{ label: computed(() => t('message.list.PurchaseDate')), prop: 'FDate', width: 200,search: true,type: 'datetime', searchSpan: 12,searchRange: true,},
{ label: computed(() => t('message.list.Comments')), prop: 'FRemarks', width: 200 },
{ label: computed(() => t('message.list.PONumber')), prop: 'fBillNo', width: 200,search: true },
{ label: computed(() => t('message.list.SupplierCode')), prop: 'supplierId', width: 200 },
{ label: computed(() => t('message.list.SupplierName')), prop: 'supplierName', width: 200 },
{ label: computed(() => t('message.list.Buyer')), prop: 'purchaser', width: 200 },
{ label: computed(() => t('message.list.SettlementMode')), prop: 'paymentMethod', width: 200,search: true },
{ label: computed(() => t('message.list.Currency')), prop: 'settlementCcurrency', width: 200,search: true },
{ label: computed(() => t('message.list.PaymentTerms')), prop: 'paymentTerms', width: 200 },
{ label: computed(() => t('message.list.ExchangeRateType')), prop: 'exchangeRateType', width: 200,search: true },
{ label: computed(() => t('message.list.ExchangeRate')), prop: 'exchangeRate', width: 200 },
{ label: computed(() => t('message.list.OrderCreater')), prop: 'creater', width: 200 },
{ label: computed(() => t('message.list.DocStatus')), prop: 'status', width: 200,search: true,type: 'select'},
{ label: computed(() => t('message.list.PurchaseDate')), prop: 'fDate', width: 200,search: true,type: 'datetime', searchSpan: 12,searchRange: true,},
{ label: computed(() => t('message.list.Comments')), prop: 'remark', width: 200 },
],
},
data: [
{
FBillNo: '005828',
FSupplierId: '005828',
FSupplyName: '美塞斯',
FPurchaserId: '采购甲',
FSettleModeId: '金砖支付系统结算',
FSettleCurrId: 'RMB',
FPayConditionId: '到付',
FExchangeTypeId: '亚洲汇率',
FExchangeRate: '1:20',
FCreatorId: '制单人甲',
FDocumentStatus: '已验收',
FDate: '2050/10/31',
FRemarks: '数据是假的',
},
],
data: [],
formData:{}
});
const toPurchaseDetails = () => {
const onLoadFun = (e:any) => {
state.page.currentPage = e.currentPage
state.page.pageSize = e.pageSize
getList()
}
const searchChange = (params:any, done:any) => {
console.log(params)
done()
if(params.fDate?.length){
console.log(11111)
}
}
const resetChange = () => {
}
const toPurchaseDetails = (item:any) => {
console.log(item)
router.push({
path: '/purchaseDetails',
query:{
topId:item.fiD
}
})
}
const getList = () => {
listApi().getPageList({
...state.formData,
pageSize:state.page.pageSize,
page:state.page.currentPage,
}).then((res:any) => {
if(res.resultCode === 0){
state.data = res.data.dataList
state.page.total = res.data.total
}
})
}
// 页面加载时
onMounted(() => {
for (let i = 0; i < 9; i++){
state.data.push({
FBillNo: '005828',
FSupplierId: '005828',
FSupplyName: '美塞斯',
FPurchaserId: '采购甲',
FSettleModeId: '金砖支付系统结算',
FSettleCurrId: 'RMB',
FPayConditionId: '到付',
FExchangeTypeId: '亚洲汇率',
FExchangeRate: '1:20',
FCreatorId: '制单人甲',
FDocumentStatus: '已验收',
FDate: '2050/10/31',
FRemarks: '数据是假的',
})
}
getList()
});
</script>

View File

@@ -1,7 +1,11 @@
<template>
<div class="system-user-container layout-padding">
<el-card class="layout-padding-auto" shadow="hover">
<avue-crud ref="crudRef" :data="state.data" :option="state.option" v-model:page="state.page" @selection-change="selectionChange">
<avue-crud
ref="crudRef"
:data="state.data"
:option="state.option"
@selection-change="selectionChange">
<template #menu-left>
<div class="menu-left" @click="selectedDataShowFun">
<span >已选中 <span style="color: #3edc95; font-size: 18px">{{ state.selectedData.length }}</span> 条数据</span >
@@ -13,7 +17,7 @@
</avue-crud>
</el-card>
<selectedData :showes="state.selectedDataShow" :listData="state.selectedData" @generateDocuments="generateDocumentsFun"/>
<receipt :showes="state.receiptShow"/>
<!-- <receipt :showes="state.receiptShow"/>-->
</div>
</template>
@@ -23,6 +27,9 @@ import { ArrowRight } from '@element-plus/icons-vue';
import selectedData from './selectedData.vue'
import receipt from './receipt.vue'
import { useI18n } from 'vue-i18n';
import {listApi} from "/@/api/list";
import { useRoute } from 'vue-router'
const route = useRoute()
const { locale, t } = useI18n();
// 定义变量内容
const state = reactive({
@@ -45,29 +52,23 @@ const state = reactive({
searchMenuSpan: 6,
addBtn: false,
column: [
{ label: computed(() => t('message.list.MaterialCode')), prop: 'FMaterialId', width: 200, search: true },
{ label: computed(() => t('message.list.MaterialName')), prop: 'FMaterialName', width: 200, search: true },
{ label: computed(() => t('message.list.Specification')), prop: 'FModel', width: 200, search: true },
{ label: computed(() => t('message.list.MaterialCode')), prop: 'materialCode', width: 200, search: true },
{ label: computed(() => t('message.list.MaterialName')), prop: 'materialName', width: 200, search: true },
{ label: computed(() => t('message.list.Specification')), prop: 'specificationModel', width: 200, search: true },
{ label: computed(() => t('message.list.PurchaseUnit')), prop: 'FUnitId', width: 200, search: true },
{ label: computed(() => t('message.list.QTY')), prop: 'FPrice', width: 200 },
{ label: computed(() => t('message.list.UP')), prop: 'FTaxPrice', width: 200 },
{ label: computed(() => t('message.list.TotalAmount')), prop: 'FEntryAmount', width: 200 },
{ label: computed(() => t('message.list.TotalAmountTaxInclusive')), prop: 'FAllAmount', width: 200 },
{ label: '采购数量', prop: 'qty', width: 200 },
{ label: '处理中数量', prop: 'processingQty', width: 200 },
{ label: '已发货数量', prop: 'sendedQty', width: 200 },
{ label: '未发货数量', prop: 'notSendQty', width: 200 },
{ label: '本次发货数量', prop: 'nowSendQty', width: 200 },
{ label: computed(() => t('message.list.UP')), prop: 'unitPrice', width: 200 },
{ label:'价税合计(含税金额', prop: 'amount1', width: 200 },
{ label: computed(() => t('message.list.TotalAmount')), prop: 'amount2', width: 200 },
{ label: computed(() => t('message.list.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
{
label: computed(() => t('message.list.DemondDate')),
prop: 'FDeliveryDate',
width: 200,
search: true,
type: 'datetime',
searchSpan: 12,
searchRange: true,
searchLabelWidth: 150,
},
{ label: computed(() => t('message.list.TaxAmount')), prop: 'TaxAmount', width: 200 },
{ label: computed(() => t('message.list.TaxAmount')), prop: 'taxAmount', width: 200 },
{
label: computed(() => t('message.list.CommittedDeliveryDate')),
prop: 'FSupDueDate',
prop: 'chengNuoJiaoQi',
width: 200,
search: true,
type: 'datetime',
@@ -77,7 +78,7 @@ const state = reactive({
},
{
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
prop: 'FSupDueNewDate',
prop: 'newChengNuoJiaoQi',
width: 200,
search: true,
type: 'datetime',
@@ -85,29 +86,14 @@ const state = reactive({
searchRange: true,
searchLabelWidth: 150,
},
{ label: computed(() => t('message.list.Comments2')), prop: 'FNote', width: 200 },
{ label: computed(() => t('message.list.Comments2')), prop: 'remark', width: 200 },
],
},
data: [
{
FMaterialId: '004785',
FMaterialName: '我也不知道是什么东西',
FModel: '这是什么型号',
FUnitId: '美塞斯',
FPrice: '10000000$',
FTaxPrice: '10000000$',
FEntryAmount: '10000000$',
FAllAmount: '10000000$',
FReceiveQty: '10',
FDeliveryDate: '2025/10/31',
FSupDueNewDate: '2025/10/31',
FSupDueDate: '2025/10/31',
TaxAmount: '10000000$',
},
],
data: [],
selectedData:[],
selectedDataShow:false,
receiptShow:false
receiptShow:false,
topId:''
});
const selectionChange = (list:any) => {
nextTick( () => {
@@ -119,29 +105,23 @@ const generateDocumentsFun = () => {
state.receiptShow = !state.receiptShow
}
const selectedDataShowFun = () => {
// = state.selectionList
state.selectedDataShow = !state.selectedDataShow
}
// 页面加载时
onMounted(() => {
for (let i = 0; i < 9; i++){
state.data.push({
FMaterialId: '004785' + i,
FMaterialName: '我也不知道是什么东西',
FModel: '这是什么型号',
FUnitId: '美塞斯',
FPrice: '10000000$',
FTaxPrice: '10000000$',
FEntryAmount: '10000000$',
FAllAmount: '10000000$',
FReceiveQty: '10',
FDeliveryDate: '2025/10/31',
FSupDueNewDate: '2025/10/31',
FSupDueDate: '2025/10/31',
TaxAmount: '10000000$',
})
}
});
state.topId = route.query.topId as string
getList()
})
const getList = () => {
listApi().getPurchaseOrderItemList({
fid:state.topId
}).then((res:any) => {
if(res.resultCode === 0){
state.data = res.data
}
})
}
</script>
<style lang="scss" scoped>

View File

@@ -1,91 +1,150 @@
<template>
<el-dialog :model-value="props.showes" width="70%" >
<avue-crud ref="crudRef" :data="props.listData" :option="state.option"></avue-crud>
<div class="btnList">
<el-button type="primary" @click="emits('generateDocuments')">生成通知单</el-button>
</div>
</el-dialog>
<el-dialog :model-value="props.showes" width="70%">
<avue-crud
ref="crudRef"
:data="props.listData"
:option="state.option"
>
<template #nowSendQty="{row}">
<div style="display: flex;align-items: center;justify-content: center">
<el-input-number v-model="row.nowSendQty" :min="1"/>
</div>
</template>
<template #chengNuoJiaoQi="{row}">
<div style="display: flex;align-items: center;justify-content: center">
<el-date-picker v-model="row.chengNuoJiaoQi" type="date" size="large" style="width: 100%" format="YYYY/MM/DD"
value-format="YYYY-MM-DD" @change="chengNuoJiaoQiChange(row)"/>
</div>
</template>
<template #newChengNuoJiaoQi="{row}">
<div style="display: flex;align-items: center;justify-content: center">
<el-date-picker v-model="row.newChengNuoJiaoQi" type="date" size="large" style="width: 100%" format="YYYY/MM/DD"
value-format="YYYY-MM-DD" @change="newChengNuoJiaoQiChange(row)"/>
</div>
</template>
</avue-crud>
<div class="btnList">
<el-button type="primary" @click="batchAddInvoiceOrderFun">生成通知单</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import {defineProps, reactive, defineEmits, computed} from 'vue';
const emits = defineEmits(['generateDocuments'])
import { defineProps, reactive, defineEmits, computed } from 'vue';
import { listApi } from '../../api/list/index'
const emits = defineEmits(['generateDocuments']);
import { useI18n } from 'vue-i18n';
const { locale, t } = useI18n();
import {ElMessage} from "element-plus";
const { t } = useI18n();
const props = defineProps({
listData:{
type: Array,
default: () => []
},
showes:{
type: Boolean,
default: false
}
listData: {
type: Array,
default: () => [],
},
showes: {
type: Boolean,
default: false,
},
});
const state = reactive({
dialogVisible: true,
option: {
tip: false,
selection: true,
index: true,
menu: false,
menuWidth: 150,
border: true,
delBtn: false,
editBtn: false,
align: 'center',
searchLabelWidth: 140,
searchMenuSpan: 6,
addBtn: false,
column: [
{ label: computed(() => t('message.list.MaterialCode')), prop: 'FMaterialId', width: 200, search: true },
{ label: computed(() => t('message.list.MaterialName')), prop: 'FMaterialName', width: 200, search: true },
{ label: computed(() => t('message.list.Specification')), prop: 'FModel', width: 200, search: true },
{ label: computed(() => t('message.list.PurchaseUnit')), prop: 'FUnitId', width: 200, search: true },
{ label: computed(() => t('message.list.QTY')), prop: 'FPrice', width: 200 },
{ label: computed(() => t('message.list.UP')), prop: 'FTaxPrice', width: 200 },
{ label: computed(() => t('message.list.TotalAmount')), prop: 'FEntryAmount', width: 200 },
{ label: computed(() => t('message.list.TotalAmountTaxInclusive')), prop: 'FAllAmount', width: 200 },
{ label: computed(() => t('message.list.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
{
label: computed(() => t('message.list.DemondDate')),
prop: 'FDeliveryDate',
width: 200,
search: true,
type: 'datetime',
searchSpan: 12,
searchRange: true,
searchLabelWidth: 150,
},
{ label: computed(() => t('message.list.TaxAmount')), prop: 'TaxAmount', width: 200 },
{
label: computed(() => t('message.list.CommittedDeliveryDate')),
prop: 'FSupDueDate',
width: 200,
search: true,
type: 'datetime',
searchSpan: 12,
searchRange: true,
searchLabelWidth: 150,
},
{
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
prop: 'FSupDueNewDate',
width: 200,
search: true,
type: 'datetime',
searchSpan: 12,
searchRange: true,
searchLabelWidth: 150,
},
{ label: computed(() => t('message.list.Comments2')), prop: 'FNote', width: 200 },
],
},
dialogVisible: true,
data: [],
show:true,
formData: {},
option: {
tip: false,
selection: false,
index: true,
menu: false,
menuWidth: 150,
border: true,
delBtn: false,
editBtn: false,
align: 'center',
searchLabelWidth: 140,
searchMenuSpan: 6,
addBtn: false,
column: [
{ label: computed(() => t('message.list.MaterialCode')), prop: 'materialCode', width: 200 },
{ label: computed(() => t('message.list.MaterialName')), prop: 'materialName', width: 200 },
{ label: computed(() => t('message.list.Specification')), prop: 'specificationModel', width: 200 },
{ label: computed(() => t('message.list.PurchaseUnit')), prop: 'FUnitId', width: 200 },
{ label: '采购数量', prop: 'qty', width: 200 },
{ label: '处理中数量', prop: 'processingQty', width: 200 },
{ label: '已发货数量', prop: 'sendedQty', width: 200 },
{ label: '未发货数量', prop: 'notSendQty', width: 200 },
{ label: '本次发货数量', prop: 'nowSendQty', width: 200,fixed:true },
{ label: computed(() => t('message.list.UP')), prop: 'amount1', width: 200 },
{ label: computed(() => t('message.list.TotalAmount')), prop: 'amount2', width: 200 },
{ label: computed(() => t('message.list.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
{ label: computed(() => t('message.list.TaxAmount')), prop: 'taxAmount', width: 200 },
{ label: computed(() => t('message.list.CommittedDeliveryDate')), prop: 'chengNuoJiaoQi',
width: 200, type: 'datetime', searchSpan: 12, searchRange: true, searchLabelWidth: 150,fixed:true },
{
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
prop: 'newChengNuoJiaoQi',
width: 200,
type: 'datetime',
searchSpan: 12,
searchRange: true,
searchLabelWidth: 150,
fixed:true
},
{ label: computed(() => t('message.list.Comments2')), prop: 'remark', width: 200 },
],
},
topId: '',
});
const chengNuoJiaoQiChange = (item:any) => {
listApi().batchSetChengNuoJiaoQi([{
id:item.id,
newTime:item.chengNuoJiaoQi
}]).then((res:any) => {
if(res.resultCode === 0){
ElMessage.success('操作成功');
}
if(res.resultCode === -1){
ElMessage.success(res.errorMessage);
}
})
}
const newChengNuoJiaoQiChange = (item:any) => {
listApi().batchSetNewChengNuoJiaoQi([{
id:item.id,
newTime:item.newChengNuoJiaoQi
}]).then((res:any) => {
if(res.resultCode === 0){
ElMessage.success('操作成功');
}
if(res.resultCode === -1){
ElMessage.success(res.errorMessage);
}
})
}
const batchAddInvoiceOrderFun = () => {
console.log(props.listData)
let arr:any = []
props.listData.forEach((item:any) => {
arr.push({
id:item.id,
qty:item.nowSendQty
})
})
listApi().batchAddInvoiceOrder(arr).then((res:any) => {
if(res.resultCode === 0){
ElMessage.success('操作成功');
emits('generateDocuments')
}
if(res.resultCode === -1){
ElMessage.success(res.errorMessage);
}
})
}
</script>
<style scoped lang="scss">
.btnList{
margin-top: 26px;
display: flex;
justify-content: center;
.btnList {
margin-top: 26px;
display: flex;
justify-content: center;
}
</style>
</style>