初次对接
This commit is contained in:
parent
55aac6feb2
commit
db1fdc5e18
@ -2,4 +2,4 @@
|
|||||||
ENV = development
|
ENV = development
|
||||||
|
|
||||||
# 本地环境接口地址
|
# 本地环境接口地址
|
||||||
VITE_API_URL = http://localhost:8888/
|
VITE_API_URL = http://8.134.66.212:90
|
@ -2,4 +2,4 @@
|
|||||||
ENV = production
|
ENV = production
|
||||||
|
|
||||||
# 线上环境接口地址
|
# 线上环境接口地址
|
||||||
VITE_API_URL = https://lyt-top.gitee.io/vue-next-admin-preview/
|
VITE_API_URL = http://8.134.66.212:90
|
56
src/api/list/index.ts
Normal file
56
src/api/list/index.ts
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import request from '/@/utils/request';
|
||||||
|
|
||||||
|
export function listApi() {
|
||||||
|
return {
|
||||||
|
//采购订单分页列表
|
||||||
|
getPageList: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/PurchaseOrder/GetPageList',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取明细列表
|
||||||
|
getPurchaseOrderItemList: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/PurchaseOrder/GetPurchaseOrderItemList',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//批量修改最新交期
|
||||||
|
batchSetNewChengNuoJiaoQi: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/PurchaseOrder/BatchSetNewChengNuoJiaoQi',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//批量修改承诺交期
|
||||||
|
batchSetChengNuoJiaoQi: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/PurchaseOrder/BatchSetChengNuoJiaoQi',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//生成发货通知单
|
||||||
|
batchAddInvoiceOrder: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/PurchaseOrder/BatchAddInvoiceOrder',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//发货通知单分页列表
|
||||||
|
invoiceOrderGetPageList: (data: object) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/Admin/InvoiceOrder/GetPageList',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
@ -9,9 +9,9 @@ import request from '/@/utils/request';
|
|||||||
*/
|
*/
|
||||||
export function useLoginApi() {
|
export function useLoginApi() {
|
||||||
return {
|
return {
|
||||||
signIn: (data: object) => {
|
login: (data: object) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/user/signIn',
|
url: '/api/Admin/Login/Login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
@ -38,7 +38,7 @@ export default {
|
|||||||
BusinessType: "单据类型",
|
BusinessType: "单据类型",
|
||||||
OrderCreator: "制单人",
|
OrderCreator: "制单人",
|
||||||
DocStatus2: "单据状态",
|
DocStatus2: "单据状态",
|
||||||
ReceivingDate: "收料日期",
|
ReceivingDate: "发货日期",
|
||||||
Comments3: "备注",
|
Comments3: "备注",
|
||||||
MaterialCode2: "物料编码",
|
MaterialCode2: "物料编码",
|
||||||
MaterialName2: "物料名称",
|
MaterialName2: "物料名称",
|
||||||
|
@ -119,7 +119,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'iconfont icon-xitongshezhi',
|
icon: 'iconfont icon-xitongshezhi',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@ -134,7 +134,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'iconfont icon-caidan',
|
icon: 'iconfont icon-caidan',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -149,7 +149,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'ele-ColdDrink',
|
icon: 'ele-ColdDrink',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -164,7 +164,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'iconfont icon-icon-',
|
icon: 'iconfont icon-icon-',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -179,7 +179,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'ele-OfficeBuilding',
|
icon: 'ele-OfficeBuilding',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -194,7 +194,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isKeepAlive: true,
|
isKeepAlive: true,
|
||||||
isAffix: false,
|
isAffix: false,
|
||||||
isIframe: false,
|
isIframe: false,
|
||||||
roles: ['admin'],
|
roles: ['admin', 'common'],
|
||||||
icon: 'ele-SetUp',
|
icon: 'ele-SetUp',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
116
src/utils/index.ts
Normal file
116
src/utils/index.ts
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
import dayjs from 'dayjs';
|
||||||
|
import md5 from 'md5';
|
||||||
|
import { customRef, ref } from "vue"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化时间
|
||||||
|
*/
|
||||||
|
export function formatTime(
|
||||||
|
date?: string | number | Date | dayjs.Dayjs | null | undefined,
|
||||||
|
template?: string | undefined
|
||||||
|
) {
|
||||||
|
return dayjs(date).format(template);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 格式化时间
|
||||||
|
*/
|
||||||
|
export function timeAgo(
|
||||||
|
date?: string | number | Date | dayjs.Dayjs | null | undefined,
|
||||||
|
template?: string
|
||||||
|
) {
|
||||||
|
const d = dayjs(date).valueOf();
|
||||||
|
const now = Date.now();
|
||||||
|
const diff = (now - d) / 1000;
|
||||||
|
if (diff < 3600) {
|
||||||
|
return Math.ceil(diff / 60) + '分钟前';
|
||||||
|
} else if (diff < 3600 * 24) {
|
||||||
|
return Math.ceil(diff / 3600) + '小时前';
|
||||||
|
} else {
|
||||||
|
return formatTime(date, template);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* md5加密
|
||||||
|
*/
|
||||||
|
export function md5Encryption(
|
||||||
|
message: string | Buffer | number[] | Uint8Array
|
||||||
|
) {
|
||||||
|
const KEY = md5('LULU Derivation');
|
||||||
|
return md5(KEY + md5(message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型检查
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function typeCheck(param: any) {
|
||||||
|
return Object.prototype.toString.call(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改stage
|
||||||
|
*/
|
||||||
|
export function mutateState(state: AnyObject, payload: AnyObject) {
|
||||||
|
if (
|
||||||
|
typeCheck(state) === '[object Object]' &&
|
||||||
|
typeCheck(payload) === '[object Object]'
|
||||||
|
) {
|
||||||
|
for (const key in payload) {
|
||||||
|
state[key] = payload[key];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('expected plain Object');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 防抖
|
||||||
|
*/
|
||||||
|
export function debounceRef (data:any, delay = 300){
|
||||||
|
let timer: NodeJS.Timeout | null = null;
|
||||||
|
return delay == null
|
||||||
|
?
|
||||||
|
ref(data)
|
||||||
|
:
|
||||||
|
customRef((track, trigger) => {
|
||||||
|
return {
|
||||||
|
get () {
|
||||||
|
track()
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
set (value) {
|
||||||
|
if(timer != null){
|
||||||
|
clearTimeout(timer)
|
||||||
|
timer = null
|
||||||
|
}
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
data = value;
|
||||||
|
trigger()
|
||||||
|
}, delay)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算两个时间之间的时间差 多少天时分秒
|
||||||
|
export function timeFn(d1: string,d2: string) {//di作为一个变量传进来
|
||||||
|
//如果时间格式是正确的,那下面这一步转化时间格式就可以不用了
|
||||||
|
var dateBegin = new Date(d1.replace(/-/g, "/"));//将-转化为/,使用new Date
|
||||||
|
var dateEnd = new Date(d2.replace(/-/g, "/"));//获取当前时间
|
||||||
|
var dateDiff = dateEnd.getTime() - dateBegin.getTime();//时间差的毫秒数
|
||||||
|
var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
|
||||||
|
var leave1=dateDiff%(24*3600*1000) //计算天数后剩余的毫秒数
|
||||||
|
var hours=Math.floor(leave1/(3600*1000))//计算出小时数
|
||||||
|
//计算相差分钟数
|
||||||
|
var leave2=leave1%(3600*1000) //计算小时数后剩余的毫秒数
|
||||||
|
var minutes=Math.floor(leave2/(60*1000))//计算相差分钟数
|
||||||
|
//计算相差秒数
|
||||||
|
var leave3=leave2%(60*1000) //计算分钟数后剩余的毫秒数
|
||||||
|
var seconds=Math.round(leave3/1000)
|
||||||
|
console.log(" 相差 "+dayDiff+"天 "+hours+"小时 "+minutes+" 分钟"+seconds+" 秒")
|
||||||
|
console.log(dateDiff+"时间差的毫秒数",dayDiff+"计算出相差天数",leave1+"计算天数后剩余的毫秒数"
|
||||||
|
,hours+"计算出小时数",minutes+"计算相差分钟数",seconds+"计算相差秒数");
|
||||||
|
}
|
@ -48,7 +48,7 @@ import { initBackEndControlRoutes } from '/@/router/backEnd';
|
|||||||
import { Session } from '/@/utils/storage';
|
import { Session } from '/@/utils/storage';
|
||||||
import { formatAxis } from '/@/utils/formatTime';
|
import { formatAxis } from '/@/utils/formatTime';
|
||||||
import { NextLoading } from '/@/utils/loading';
|
import { NextLoading } from '/@/utils/loading';
|
||||||
|
import { useLoginApi } from '../../../api/login/index'
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const storesThemeConfig = useThemeConfig();
|
const storesThemeConfig = useThemeConfig();
|
||||||
@ -58,8 +58,8 @@ const router = useRouter();
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
isShowPassword: false,
|
isShowPassword: false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
userName: 'admin',
|
userName: 'abc',
|
||||||
password: '123456',
|
password: '123',
|
||||||
code: '1234',
|
code: '1234',
|
||||||
},
|
},
|
||||||
loading: {
|
loading: {
|
||||||
@ -72,23 +72,32 @@ const currentTime = computed(() => {
|
|||||||
return formatAxis(new Date());
|
return formatAxis(new Date());
|
||||||
});
|
});
|
||||||
// 登录
|
// 登录
|
||||||
const onSignIn = async () => {
|
const onSignIn = () => {
|
||||||
state.loading.signIn = true;
|
state.loading.signIn = true;
|
||||||
// 存储 token 到浏览器缓存
|
useLoginApi().login({
|
||||||
Session.set('token', Math.random().toString(36).substr(0));
|
userName: state.ruleForm.userName,
|
||||||
// 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
|
passWord: state.ruleForm.password,
|
||||||
Cookies.set('userName', state.ruleForm.userName);
|
}).then( async (res:any) => {
|
||||||
if (!themeConfig.value.isRequestRoutes) {
|
console.log(res)
|
||||||
// 前端控制路由,2、请注意执行顺序
|
if(res.data !== null){
|
||||||
const isNoPower = await initFrontEndControlRoutes();
|
// 存储 token 到浏览器缓存
|
||||||
signInSuccess(isNoPower);
|
Session.set('token', res.data);
|
||||||
} else {
|
// 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
|
||||||
// 模拟后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
|
Cookies.set('userName', state.ruleForm.userName);
|
||||||
// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
|
if (!themeConfig.value.isRequestRoutes) {
|
||||||
const isNoPower = await initBackEndControlRoutes();
|
// 前端控制路由,2、请注意执行顺序
|
||||||
// 执行完 initBackEndControlRoutes,再执行 signInSuccess
|
const isNoPower = await initFrontEndControlRoutes();
|
||||||
signInSuccess(isNoPower);
|
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) => {
|
const signInSuccess = (isNoPower: boolean | undefined) => {
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="system-user-container layout-padding">
|
<div class="system-user-container layout-padding">
|
||||||
<el-card class="layout-padding-auto" shadow="hover">
|
<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>
|
<template #menu>
|
||||||
<div class="btnList">
|
<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>
|
<el-button type="text" icon="el-icon-pie-chart" @click="state.selectedDataShow = true">查看单据</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -19,9 +28,9 @@ import { reactive, onMounted,computed } from 'vue';
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import selectedData from './selectedData.vue'
|
import selectedData from './selectedData.vue'
|
||||||
|
import {listApi} from "/@/api/list";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
const { t } = useI18n();
|
||||||
const { locale, t } = useI18n();
|
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -41,56 +50,59 @@ const state = reactive({
|
|||||||
searchMenuSpan:6,
|
searchMenuSpan:6,
|
||||||
addBtn:false,
|
addBtn:false,
|
||||||
column: [
|
column: [
|
||||||
{ label: computed(() => t('message.list.PONumber2')), prop: 'FBillNo', width: 200,search: true },
|
{ label: '采购订单号', prop: 'purchaseOrderFBillNo', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.SupplierCode2')), prop: 'FSupplierId', width: 200,search: true },
|
{ label: '发货单号', prop: 'sheet', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.SupplierName2')), prop: 'FSupplyName', 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.Buyer2')), prop: 'FPurchaserId', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.ReceiveOrg')), prop: 'FStockOrgId', 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.BusinessType')), prop: 'FBillTypeID', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.OrderCreator')), prop: 'FCreatorId', 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.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.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.Comments3')), prop: 'FRemarks', width: 200 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
data: [
|
data: [],
|
||||||
{
|
selectedDataShow:false,
|
||||||
FBillNo: '005828',
|
formData:{}
|
||||||
FSupplierId: '005828',
|
|
||||||
FSupplyName: '美塞斯',
|
|
||||||
FPurchaserId: '采购甲',
|
|
||||||
FStockOrgId: '不知道',
|
|
||||||
FBillTypeID:'111',
|
|
||||||
FCreatorId: '制单人甲',
|
|
||||||
FDate: '2050/10/31',
|
|
||||||
FDocumentStatus: '已验收',
|
|
||||||
FRemarks: '数据是假的',
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
selectedDataShow:false
|
|
||||||
});
|
});
|
||||||
const toPurchaseDetails = () => {
|
const toPurchaseDetails = () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/materialReceiptNoticePurchaseDetails',
|
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(() => {
|
onMounted(() => {
|
||||||
for (let i = 0; i < 9; i++){
|
getList()
|
||||||
state.data.push({
|
|
||||||
FBillNo: '005828',
|
|
||||||
FSupplierId: '005828',
|
|
||||||
FSupplyName: '美塞斯',
|
|
||||||
FPurchaserId: '采购甲',
|
|
||||||
FStockOrgId: '不知道',
|
|
||||||
FBillTypeID:'111',
|
|
||||||
FCreatorId: '制单人甲',
|
|
||||||
FDate: '2050/10/31',
|
|
||||||
FDocumentStatus: '已验收',
|
|
||||||
FRemarks: '数据是假的',
|
|
||||||
},)
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="system-user-container layout-padding">
|
<div class="system-user-container layout-padding">
|
||||||
<el-card class="layout-padding-auto" shadow="hover">
|
<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
|
||||||
<template #menu>
|
ref="crudRef"
|
||||||
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails">查看</el-button>
|
: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>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -11,12 +23,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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 { useRouter } from 'vue-router'
|
||||||
|
import { listApi } from '../../api/list/index'
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const props = defineProps({
|
||||||
|
|
||||||
|
})
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
page: {
|
page: {
|
||||||
@ -31,68 +47,68 @@ const state = reactive({
|
|||||||
delBtn: false,
|
delBtn: false,
|
||||||
editBtn: false,
|
editBtn: false,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
searchLabelWidth:130,
|
searchLabelWidth:100,
|
||||||
searchMenuSpan:6,
|
searchMenuSpan:6,
|
||||||
addBtn:false,
|
addBtn:false,
|
||||||
column: [
|
column: [
|
||||||
{ label: computed(() => t('message.list.PONumber')), prop: 'FBillNo', width: 200,search: true },
|
{ 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.SupplierCode')), prop: 'supplierId', width: 200 },
|
||||||
{ label: computed(() => t('message.list.SupplierName')), prop: 'FSupplyName', width: 200,search: true },
|
{ label: computed(() => t('message.list.SupplierName')), prop: 'supplierName', width: 200 },
|
||||||
{ label: computed(() => t('message.list.Buyer')), prop: 'FPurchaserId', width: 200,search: true },
|
{ label: computed(() => t('message.list.Buyer')), prop: 'purchaser', width: 200 },
|
||||||
{ label: computed(() => t('message.list.SettlementMode')), prop: 'FSettleModeId', width: 200,search: true },
|
{ label: computed(() => t('message.list.SettlementMode')), prop: 'paymentMethod', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.Currency')), prop: 'FSettleCurrId', width: 200,search: true },
|
{ label: computed(() => t('message.list.Currency')), prop: 'settlementCcurrency', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.PaymentTerms')), prop: 'FPayConditionId', width: 200,search: true },
|
{ label: computed(() => t('message.list.PaymentTerms')), prop: 'paymentTerms', width: 200 },
|
||||||
{ label: computed(() => t('message.list.ExchangeRateType')), prop: 'FExchangeTypeId', width: 200 },
|
{ label: computed(() => t('message.list.ExchangeRateType')), prop: 'exchangeRateType', width: 200,search: true },
|
||||||
{ label: computed(() => t('message.list.ExchangeRate')), prop: 'FExchangeRate', width: 200 },
|
{ label: computed(() => t('message.list.ExchangeRate')), prop: 'exchangeRate', width: 200 },
|
||||||
{ label: computed(() => t('message.list.OrderCreater')), prop: 'FCreatorId', width: 200,search: true },
|
{ label: computed(() => t('message.list.OrderCreater')), prop: 'creater', width: 200 },
|
||||||
{ label: computed(() => t('message.list.DocStatus')), prop: 'FDocumentStatus', width: 200,search: true },
|
{ 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.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.Comments')), prop: 'remark', width: 200 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
data: [
|
data: [],
|
||||||
{
|
formData:{}
|
||||||
FBillNo: '005828',
|
|
||||||
FSupplierId: '005828',
|
|
||||||
FSupplyName: '美塞斯',
|
|
||||||
FPurchaserId: '采购甲',
|
|
||||||
FSettleModeId: '金砖支付系统结算',
|
|
||||||
FSettleCurrId: 'RMB',
|
|
||||||
FPayConditionId: '到付',
|
|
||||||
FExchangeTypeId: '亚洲汇率',
|
|
||||||
FExchangeRate: '1:20',
|
|
||||||
FCreatorId: '制单人甲',
|
|
||||||
FDocumentStatus: '已验收',
|
|
||||||
FDate: '2050/10/31',
|
|
||||||
FRemarks: '数据是假的',
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
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({
|
router.push({
|
||||||
path: '/purchaseDetails',
|
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(() => {
|
onMounted(() => {
|
||||||
for (let i = 0; i < 9; i++){
|
getList()
|
||||||
state.data.push({
|
|
||||||
FBillNo: '005828',
|
|
||||||
FSupplierId: '005828',
|
|
||||||
FSupplyName: '美塞斯',
|
|
||||||
FPurchaserId: '采购甲',
|
|
||||||
FSettleModeId: '金砖支付系统结算',
|
|
||||||
FSettleCurrId: 'RMB',
|
|
||||||
FPayConditionId: '到付',
|
|
||||||
FExchangeTypeId: '亚洲汇率',
|
|
||||||
FExchangeRate: '1:20',
|
|
||||||
FCreatorId: '制单人甲',
|
|
||||||
FDocumentStatus: '已验收',
|
|
||||||
FDate: '2050/10/31',
|
|
||||||
FRemarks: '数据是假的',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="system-user-container layout-padding">
|
<div class="system-user-container layout-padding">
|
||||||
<el-card class="layout-padding-auto" shadow="hover">
|
<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>
|
<template #menu-left>
|
||||||
<div class="menu-left" @click="selectedDataShowFun">
|
<div class="menu-left" @click="selectedDataShowFun">
|
||||||
<span >已选中 <span style="color: #3edc95; font-size: 18px">{{ state.selectedData.length }}</span> 条数据</span >
|
<span >已选中 <span style="color: #3edc95; font-size: 18px">{{ state.selectedData.length }}</span> 条数据</span >
|
||||||
@ -13,7 +17,7 @@
|
|||||||
</avue-crud>
|
</avue-crud>
|
||||||
</el-card>
|
</el-card>
|
||||||
<selectedData :showes="state.selectedDataShow" :listData="state.selectedData" @generateDocuments="generateDocumentsFun"/>
|
<selectedData :showes="state.selectedDataShow" :listData="state.selectedData" @generateDocuments="generateDocumentsFun"/>
|
||||||
<receipt :showes="state.receiptShow"/>
|
<!-- <receipt :showes="state.receiptShow"/>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,6 +27,9 @@ import { ArrowRight } from '@element-plus/icons-vue';
|
|||||||
import selectedData from './selectedData.vue'
|
import selectedData from './selectedData.vue'
|
||||||
import receipt from './receipt.vue'
|
import receipt from './receipt.vue'
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import {listApi} from "/@/api/list";
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -45,29 +52,23 @@ const state = reactive({
|
|||||||
searchMenuSpan: 6,
|
searchMenuSpan: 6,
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
column: [
|
column: [
|
||||||
{ label: computed(() => t('message.list.MaterialCode')), prop: 'FMaterialId', width: 200, search: true },
|
{ label: computed(() => t('message.list.MaterialCode')), prop: 'materialCode', width: 200, search: true },
|
||||||
{ label: computed(() => t('message.list.MaterialName')), prop: 'FMaterialName', width: 200, search: true },
|
{ label: computed(() => t('message.list.MaterialName')), prop: 'materialName', width: 200, search: true },
|
||||||
{ label: computed(() => t('message.list.Specification')), prop: 'FModel', 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.PurchaseUnit')), prop: 'FUnitId', width: 200, search: true },
|
||||||
{ label: computed(() => t('message.list.QTY')), prop: 'FPrice', width: 200 },
|
{ label: '采购数量', prop: 'qty', width: 200 },
|
||||||
{ label: computed(() => t('message.list.UP')), prop: 'FTaxPrice', width: 200 },
|
{ label: '处理中数量', prop: 'processingQty', width: 200 },
|
||||||
{ label: computed(() => t('message.list.TotalAmount')), prop: 'FEntryAmount', width: 200 },
|
{ label: '已发货数量', prop: 'sendedQty', width: 200 },
|
||||||
{ label: computed(() => t('message.list.TotalAmountTaxInclusive')), prop: 'FAllAmount', 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.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
|
||||||
{
|
{ label: computed(() => t('message.list.TaxAmount')), prop: 'taxAmount', 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')),
|
label: computed(() => t('message.list.CommittedDeliveryDate')),
|
||||||
prop: 'FSupDueDate',
|
prop: 'chengNuoJiaoQi',
|
||||||
width: 200,
|
width: 200,
|
||||||
search: true,
|
search: true,
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
@ -77,7 +78,7 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
|
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
|
||||||
prop: 'FSupDueNewDate',
|
prop: 'newChengNuoJiaoQi',
|
||||||
width: 200,
|
width: 200,
|
||||||
search: true,
|
search: true,
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
@ -85,29 +86,14 @@ const state = reactive({
|
|||||||
searchRange: true,
|
searchRange: true,
|
||||||
searchLabelWidth: 150,
|
searchLabelWidth: 150,
|
||||||
},
|
},
|
||||||
{ label: computed(() => t('message.list.Comments2')), prop: 'FNote', width: 200 },
|
{ label: computed(() => t('message.list.Comments2')), prop: 'remark', width: 200 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
data: [
|
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$',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
selectedData:[],
|
selectedData:[],
|
||||||
selectedDataShow:false,
|
selectedDataShow:false,
|
||||||
receiptShow:false
|
receiptShow:false,
|
||||||
|
topId:''
|
||||||
});
|
});
|
||||||
const selectionChange = (list:any) => {
|
const selectionChange = (list:any) => {
|
||||||
nextTick( () => {
|
nextTick( () => {
|
||||||
@ -119,29 +105,23 @@ const generateDocumentsFun = () => {
|
|||||||
state.receiptShow = !state.receiptShow
|
state.receiptShow = !state.receiptShow
|
||||||
}
|
}
|
||||||
const selectedDataShowFun = () => {
|
const selectedDataShowFun = () => {
|
||||||
// = state.selectionList
|
|
||||||
state.selectedDataShow = !state.selectedDataShow
|
state.selectedDataShow = !state.selectedDataShow
|
||||||
}
|
}
|
||||||
// 页面加载时
|
// 页面加载时
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
for (let i = 0; i < 9; i++){
|
state.topId = route.query.topId as string
|
||||||
state.data.push({
|
getList()
|
||||||
FMaterialId: '004785' + i,
|
})
|
||||||
FMaterialName: '我也不知道是什么东西',
|
const getList = () => {
|
||||||
FModel: '这是什么型号',
|
listApi().getPurchaseOrderItemList({
|
||||||
FUnitId: '美塞斯',
|
fid:state.topId
|
||||||
FPrice: '10000000$',
|
}).then((res:any) => {
|
||||||
FTaxPrice: '10000000$',
|
if(res.resultCode === 0){
|
||||||
FEntryAmount: '10000000$',
|
state.data = res.data
|
||||||
FAllAmount: '10000000$',
|
}
|
||||||
FReceiveQty: '10',
|
})
|
||||||
FDeliveryDate: '2025/10/31',
|
}
|
||||||
FSupDueNewDate: '2025/10/31',
|
|
||||||
FSupDueDate: '2025/10/31',
|
|
||||||
TaxAmount: '10000000$',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,91 +1,150 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :model-value="props.showes" width="70%" >
|
<el-dialog :model-value="props.showes" width="70%">
|
||||||
<avue-crud ref="crudRef" :data="props.listData" :option="state.option"></avue-crud>
|
<avue-crud
|
||||||
<div class="btnList">
|
ref="crudRef"
|
||||||
<el-button type="primary" @click="emits('generateDocuments')">生成通知单</el-button>
|
:data="props.listData"
|
||||||
</div>
|
:option="state.option"
|
||||||
</el-dialog>
|
>
|
||||||
|
<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>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {defineProps, reactive, defineEmits, computed} from 'vue';
|
import { defineProps, reactive, defineEmits, computed } from 'vue';
|
||||||
const emits = defineEmits(['generateDocuments'])
|
import { listApi } from '../../api/list/index'
|
||||||
|
const emits = defineEmits(['generateDocuments']);
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
const { locale, t } = useI18n();
|
import {ElMessage} from "element-plus";
|
||||||
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
listData:{
|
listData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
showes:{
|
showes: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
dialogVisible: true,
|
dialogVisible: true,
|
||||||
option: {
|
data: [],
|
||||||
tip: false,
|
show:true,
|
||||||
selection: true,
|
formData: {},
|
||||||
index: true,
|
option: {
|
||||||
menu: false,
|
tip: false,
|
||||||
menuWidth: 150,
|
selection: false,
|
||||||
border: true,
|
index: true,
|
||||||
delBtn: false,
|
menu: false,
|
||||||
editBtn: false,
|
menuWidth: 150,
|
||||||
align: 'center',
|
border: true,
|
||||||
searchLabelWidth: 140,
|
delBtn: false,
|
||||||
searchMenuSpan: 6,
|
editBtn: false,
|
||||||
addBtn: false,
|
align: 'center',
|
||||||
column: [
|
searchLabelWidth: 140,
|
||||||
{ label: computed(() => t('message.list.MaterialCode')), prop: 'FMaterialId', width: 200, search: true },
|
searchMenuSpan: 6,
|
||||||
{ label: computed(() => t('message.list.MaterialName')), prop: 'FMaterialName', width: 200, search: true },
|
addBtn: false,
|
||||||
{ label: computed(() => t('message.list.Specification')), prop: 'FModel', width: 200, search: true },
|
column: [
|
||||||
{ label: computed(() => t('message.list.PurchaseUnit')), prop: 'FUnitId', width: 200, search: true },
|
{ label: computed(() => t('message.list.MaterialCode')), prop: 'materialCode', width: 200 },
|
||||||
{ label: computed(() => t('message.list.QTY')), prop: 'FPrice', width: 200 },
|
{ label: computed(() => t('message.list.MaterialName')), prop: 'materialName', width: 200 },
|
||||||
{ label: computed(() => t('message.list.UP')), prop: 'FTaxPrice', width: 200 },
|
{ label: computed(() => t('message.list.Specification')), prop: 'specificationModel', width: 200 },
|
||||||
{ label: computed(() => t('message.list.TotalAmount')), prop: 'FEntryAmount', width: 200 },
|
{ label: computed(() => t('message.list.PurchaseUnit')), prop: 'FUnitId', width: 200 },
|
||||||
{ label: computed(() => t('message.list.TotalAmountTaxInclusive')), prop: 'FAllAmount', width: 200 },
|
{ label: '采购数量', prop: 'qty', width: 200 },
|
||||||
{ label: computed(() => t('message.list.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
|
{ label: '处理中数量', prop: 'processingQty', width: 200 },
|
||||||
{
|
{ label: '已发货数量', prop: 'sendedQty', width: 200 },
|
||||||
label: computed(() => t('message.list.DemondDate')),
|
{ label: '未发货数量', prop: 'notSendQty', width: 200 },
|
||||||
prop: 'FDeliveryDate',
|
{ label: '本次发货数量', prop: 'nowSendQty', width: 200,fixed:true },
|
||||||
width: 200,
|
{ label: computed(() => t('message.list.UP')), prop: 'amount1', width: 200 },
|
||||||
search: true,
|
{ label: computed(() => t('message.list.TotalAmount')), prop: 'amount2', width: 200 },
|
||||||
type: 'datetime',
|
{ label: computed(() => t('message.list.AccumulatedReceiptQTY')), prop: 'FReceiveQty', width: 200 },
|
||||||
searchSpan: 12,
|
{ label: computed(() => t('message.list.TaxAmount')), prop: 'taxAmount', width: 200 },
|
||||||
searchRange: true,
|
{ label: computed(() => t('message.list.CommittedDeliveryDate')), prop: 'chengNuoJiaoQi',
|
||||||
searchLabelWidth: 150,
|
width: 200, type: 'datetime', searchSpan: 12, searchRange: true, searchLabelWidth: 150,fixed:true },
|
||||||
},
|
{
|
||||||
{ label: computed(() => t('message.list.TaxAmount')), prop: 'TaxAmount', width: 200 },
|
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
|
||||||
{
|
prop: 'newChengNuoJiaoQi',
|
||||||
label: computed(() => t('message.list.CommittedDeliveryDate')),
|
width: 200,
|
||||||
prop: 'FSupDueDate',
|
type: 'datetime',
|
||||||
width: 200,
|
searchSpan: 12,
|
||||||
search: true,
|
searchRange: true,
|
||||||
type: 'datetime',
|
searchLabelWidth: 150,
|
||||||
searchSpan: 12,
|
fixed:true
|
||||||
searchRange: true,
|
},
|
||||||
searchLabelWidth: 150,
|
{ label: computed(() => t('message.list.Comments2')), prop: 'remark', width: 200 },
|
||||||
},
|
],
|
||||||
{
|
},
|
||||||
label: computed(() => t('message.list.LatestCommittedDeliveryDate')),
|
topId: '',
|
||||||
prop: 'FSupDueNewDate',
|
|
||||||
width: 200,
|
|
||||||
search: true,
|
|
||||||
type: 'datetime',
|
|
||||||
searchSpan: 12,
|
|
||||||
searchRange: true,
|
|
||||||
searchLabelWidth: 150,
|
|
||||||
},
|
|
||||||
{ label: computed(() => t('message.list.Comments2')), prop: 'FNote', width: 200 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.btnList{
|
.btnList {
|
||||||
margin-top: 26px;
|
margin-top: 26px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -29,7 +29,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
hmr: true,
|
hmr: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'https://daogoufestival.site.zhongwangyingtong.com',
|
target: 'http://8.134.66.212:90',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user