用户权限问题

This commit is contained in:
刘晓鹏 2025-04-30 15:19:37 +08:00
parent 1d4d76d6d1
commit eef4079220
14 changed files with 414 additions and 328 deletions

View File

@ -111,5 +111,13 @@ export function listApi() {
params:data,
});
},
//根据每包数量得到全部包裹的条码
setBaoShuTiaoMa: (data: object) => {
return request({
url: '/api/Admin/InvoiceOrder/SetBaoShuTiaoMa',
method: 'post',
data,
});
},
};
}

View File

@ -9,8 +9,8 @@ export default {
two4: '友情链接',
},
account: {
accountPlaceholder1: '用户名 admin 或不输均为 common',
accountPlaceholder2: '密码123456',
accountPlaceholder1: '用户名',
accountPlaceholder2: '密码',
accountPlaceholder3: '请输入验证码',
accountBtnText: '登 录',
},

View File

@ -33,7 +33,9 @@ export default {
batchUpdateEarliestDeliveryDate: 'Batch update Earliest Delivery Date',
batchUpdateLatestDeliveryDate: 'Batch update Latest Delivery Date',
specification:'Specification',
xsddh:'SO#',
sgxsddh:'SO#(manual)',
khmc:'Customer',
/*发货订单及其明细*/
startDate: 'Start Date',
endDate: 'End Date',
@ -60,6 +62,7 @@ export default {
deliveryNote1:'Delivery Note',
deliveryNoteNumber:'Delivery Note Number',
deliveryNoteNumber1:'GRN #',
deliveryNoteNumber2:'Delivery tracking number',
PO:'PO #',
PO1:'PO #',
shipper:'Shipper',
@ -74,6 +77,7 @@ export default {
copy:'Copy',
deleteText:'Delete',
scqd:'Please confirm the deletion of the delivery note?',
receiver:'Receiver'
receiver:'Receiver',
sltzddh:'Delivery Note Number'
},
};

View File

@ -34,7 +34,8 @@ export default {
batchUpdateLatestDeliveryDate: '批量修改选中承诺最新交期',
specification: '物料规格',
xsddh:'销售订单号',
sgxsddh:'手工销售订单号',
khmc:'客户名称',
/*发货订单及其明细*/
startDate: '开始送货日期',
endDate: '送货结束日期',
@ -62,6 +63,7 @@ export default {
deliveryNote1:'采购送货单',
deliveryNoteNumber:'收料通知单编号(送货单号)',
deliveryNoteNumber1:'收料通知单编号',
deliveryNoteNumber2:'送货单号',
PO:'PO号',
PO1:'采购订单号',
shipper:'送货人',
@ -77,5 +79,6 @@ export default {
deleteText:'删除',
scqd:'确定要删除该条送货单?',
receiver:'接收人',
sltzddh:'收料通知单单号'
},
};

View File

@ -65,7 +65,7 @@
<el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick">
<span class="layout-navbars-breadcrumb-user-link">
<img :src="userInfos.photo" class="layout-navbars-breadcrumb-user-link-photo mr5" />
{{ userInfos.userName === '' ? 'common' : userInfos.userName }}
{{ state.userInfoObj.name === '' ? 'common' : state.userInfoObj.name }}
<el-icon class="el-icon--right">
<ele-ArrowDown />
</el-icon>
@ -87,7 +87,7 @@
<el-input v-model="state.password" :placeholder="t('message.index.modifyPassword')" type="password" clearable></el-input>
<template #footer>
<span class="dialog-footer">
<el-button size="default" @click="()=>{state.dialogShow = true}">{{ t('message.index.cancel') }}</el-button>
<el-button size="default" @click="()=>{state.dialogShow = false}">{{ t('message.index.cancel') }}</el-button>
<el-button type="primary" size="default" @click="passwordFunTJ">{{ t('message.index.confirm') }}</el-button>
</span>
</template>
@ -127,7 +127,8 @@ const state = reactive({
disabledI18n: 'zh-cn',
disabledSize: 'large',
dialogShow:false,
password:''
password:'',
userInfoObj:{}
});
const dialogCloseFun = () => {
state.dialogShow = false
@ -251,6 +252,7 @@ onMounted(() => {
} else {
onLanguageChange('zh-cn', false);
}
state.userInfoObj = Local.get('setUserInfo')
});
</script>

View File

@ -119,7 +119,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
isKeepAlive: true,
isAffix: false,
isIframe: false,
roles: ['admin', 'common'],
roles: ['admin'],
icon: 'iconfont icon-xitongshezhi',
},
children: [

View File

@ -75,7 +75,7 @@ const state = reactive({
language:Local.get('langes'),
isShowPassword: false,
ruleForm: {
//kingdee123..
//Maxcess#-!@#4
userName: '',
password: '',
code: '',
@ -101,6 +101,11 @@ const initI18nOrSize = (value: string, attr: string) => {
const currentTime = computed(() => {
return formatAxis(new Date());
});
const accGetUserInfo = async () => {
await useLoginApi().getAccountInfo({}).then((resUser:any) => {
Local.set('setUserInfo',resUser.data);
})
}
//
const onSignIn = () => {
state.loading.signIn = true;
@ -109,13 +114,11 @@ const onSignIn = () => {
passWord: state.ruleForm.password,
}).then( async (res:any) => {
state.loading.signIn = false;
useLoginApi().getAccountInfo({}).then((resUser:any) => {
Local.set('setUserInfo',resUser.data);
Cookies.set('userName', resUser.data.name);
})
if(res.data !== null){
accGetUserInfo()
// token
Session.set('token', res.data);
Cookies.set('userName', state.ruleForm.userName);
// `/src/stores/userInfo.ts`
if (!themeConfig.value.isRequestRoutes) {
// 2
@ -131,7 +134,6 @@ const onSignIn = () => {
}
})
};
//
const signInSuccess = (isNoPower: boolean | undefined) => {

View File

@ -11,15 +11,14 @@
<span class="span1">{{ t('message.index.deliveryNoteNumber') }}</span>
<span class="span2">{{ state.pageData.fBillNo }}</span>
</div>
<div class="dataText">
<span class="span1">客户</span>
<span class="span2">{{ state.pageData.fBillNo }}</span>
</div>
<div class="dataText">
<span class="span1">{{ t('message.index.supplierName') }}</span>
<span class="span2">{{ state.pageData.supplierName }}</span>
</div>
<div class="dataText">
<span class="span1">{{ t('message.index.khmc') }}</span>
<span class="span2">{{ state.pageData.fPurchaseOrgName }}</span>
</div>
<div class="dataText">
<span class="span1">{{ t('message.index.deliveryDate') }}</span>
<span class="span2">{{ state.pageData.deliveryDate }}</span>
@ -75,6 +74,7 @@ const state = reactive({
supplierName: '',
deliveryDate: '',
f_VHUB_Text: '',
fPurchaseOrgName:''
},
option: {
tip: false,
@ -94,7 +94,7 @@ const state = reactive({
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName' },
{ label: computed(() => t('message.index.unit1')), prop: 'unitName' },
{ label: computed(() => t('message.index.POQTY')), prop: 'purchaseQty' },
// { label: computed(() => t('message.index.POQTY')), prop: 'purchaseQty' },
{ label: computed(() => t('message.index.deliveryQTY')), prop: 'qty' },
{ label: computed(() => t('message.index.maxcessLot')), prop: 'mssSupplierLot' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
@ -111,6 +111,7 @@ watch(
state.pageData.supplierName = arr[0].supplierName;
state.pageData.deliveryDate = arr[0].deliveryDate;
state.pageData.f_VHUB_Text = arr[0].f_VHUB_Text;
state.pageData.fPurchaseOrgName = arr[0].fPurchaseOrgName;
}
},
{ immediate: true, deep: true }

View File

@ -6,22 +6,28 @@
<el-input-number v-model="row.packagingQuantity" style="width: 100%" :min="1" size="small" @change="inputNumberFun($event, row)" />
</div>
</template>
<template #supplierName="{ row }">
<el-tooltip :content="row.supplierName" placement="top">
<div class="multi-line-omit">{{ row.supplierName }}</div>
</el-tooltip>
</template>
<template #printBtn="{ row }">
<el-button type="text">
<div style="display: flex; align-items: center" @click="printThisFun(row)">{{ row.printBtn }}</div>
</el-button>
<el-button type="text" @click="printCheckCaseFun(row)">重新打印</el-button>
</template>
<template #expand="{ row }">
<template #expand="expandObj">
<div class="expandListBox">
<div class="expandItem" v-for="(item, index) of row.children" :key="index">
<div class="expandItemCol" v-for="(itemCol, indexCol) in item" :key="indexCol">
<div v-if="itemCol != '打印此包装'">{{ itemCol }}</div>
<el-button v-else type="text" @click="printPackingFun(item)">
<div style="display: flex; align-items: center">{{ itemCol }}</div>
</el-button>
</div>
</div>
<avue-crud ref="crudRef" :data="expandObj.row.children" :option="state.expandOption">
<template #supplierName="{ row }">
<el-tooltip :content="row.supplierName" placement="top">
<div class="multi-line-omit">{{ row.supplierName }}</div>
</el-tooltip>
</template>
<template #printBtn="{ row }">
<el-button type="text" @click="printPackingFun(row,expandObj.row)">包装打印</el-button>
</template>
</avue-crud>
</div>
</template>
<template #menu-left>
@ -36,11 +42,11 @@
<template #prepend>{{ t('message.index.deliveryNote') }}</template>
</el-input>
</div>
<div class="selectItem">
<el-input v-model="state.indexRow.fBillNo" style="width: 280px" size="default" disabled>
<template #prepend>收料通知单</template>
</el-input>
</div>
<div class="selectItem">
<el-input v-model="state.indexRow.fBillNo" style="width: 280px" size="default" disabled>
<template #prepend>收料通知单</template>
</el-input>
</div>
<div class="selectItem">
<el-select v-model="state.printSelection" clearable placeholder="请选择打印模板" size="default" style="width: 150px">
<el-option label="珠海" value="0" />
@ -48,7 +54,8 @@
</el-select>
</div>
<el-button type="primary" size="default" @click="printCheckAllFun">整单打印</el-button>
<el-button type="danger" size="default" v-if="state.timer !== null" @click="printCheckDangerFun">取消打印</el-button>
<el-button type="primary" size="default" @click="defaultPrinterFun">选择默认打印机</el-button>
<el-button type="danger" size="default" v-if="state.timer !== null" @click="printCheckDangerFun">取消打印 </el-button>
</div>
</template>
</avue-crud>
@ -60,8 +67,7 @@ import { computed, defineExpose, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { listApi } from '/@/api/list';
import barCode from './barCode.vue';
import {ElMessage, ElMessageBox, ElNotification} from 'element-plus';
import { Session } from '/@/utils/storage';
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
const LODOP = window.LODOP;
const barCodeRef = ref();
const { t } = useI18n();
@ -70,7 +76,7 @@ const state: any = reactive({
show: false,
printSelection: '0',
printJQ: '',
printState:'0',
printState: '0',
option: {
expand: true,
expandRowKeys: [1],
@ -94,7 +100,36 @@ const state: any = reactive({
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName' },
{ label: computed(() => t('message.index.supplierCode')), prop: 'supplierId' },
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName' },
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName'},
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'qty' },
{ label: '每包数', prop: 'packagingQuantity' },
{ label: '包装数 / 序号', prop: 'quantityPerPackage' },
{ label: computed(() => t('message.index.print')), prop: 'printBtn' },
],
},
expandOption: {
expandRowKeys: [1],
rowKey: 'id',
tip: false,
selection: false,
index: false,
menu: false,
menuWidth: 150,
border: true,
delBtn: false,
editBtn: false,
align: 'center',
searchLabelWidth: 140,
searchMenuSpan: 6,
addBtn: false,
column: [
{ label: computed(() => t('message.index.PO1')), prop: 'purchaseOrderFBillNo' },
{ label: computed(() => t('message.index.maxcessLot')), prop: 'mssSupplierLot' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName' },
{ label: computed(() => t('message.index.supplierCode')), prop: 'supplierId' },
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName' },
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'qty' },
{ label: '每包数', prop: 'packagingQuantity' },
{ label: '包装数 / 序号', prop: 'quantityPerPackage' },
@ -110,6 +145,7 @@ const state: any = reactive({
indexRow: {},
printerList: [],
timer: null,
allSetTime: null,
});
//
const printVerification = () => {
@ -125,146 +161,127 @@ const printVerification = () => {
};
//
const printCheckDangerFun = () => {
LODOP.SET_PRINT_MODE(`CONTROL_PRINTER:${state.printJQ}`, "PURGE");
clearInterval(state.timer);
state.timer = null;
}
LODOP.SET_PRINT_MODE(`CONTROL_PRINTER:${state.printJQ}`, 'PURGE');
clearInterval(state.allSetTime);
clearInterval(state.timer);
state.timer = null;
};
//
const defaultPrinterFun = () => {
LODOP.SELECT_PRINTER();
};
//
const printCheckAllFun = () => {
if (printVerification()) {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: t('message.index.prompt'),
message: '确定要打印整单吗?',
confirmButtonText: t('message.index.confirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
let arr:any = []
state.data.forEach((item:any) => {
if(item.children.length){
arr = arr.concat(item.children)
console.log(arr)
} else {
for (let i = 0; i < item.qty; i++){
arr.push({...item,packagingQuantity:1,tiaoMa:item.tiaoMa})
}
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: t('message.index.prompt'),
message: '确定要打印整单吗?',
confirmButtonText: t('message.index.confirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
let i: number = 0;
state.allSetTime = setInterval(() => {
if (state.printState === '0') {
getBaoShuTiaoMa(state.data[i].id, state.data[i].packagingQuantity, i);
i++;
}
if (state.data.length == i) {
clearInterval(state.allSetTime);
state.allSetTime = null;
}
})
dataExtractFun(arr);
done()
} else {
done();
}
},
});
}
};
//
const printCheckCaseFun = (row: any) => {
if (printVerification()) {
dataExtractFun([{ ...row,packagingQuantity:row.packagingQuantity }]);
}
}, 500);
done();
} else {
done();
}
},
});
}
};
//
const printPackingFun = (row:any) => {
if (printVerification()) {
dataExtractFun([{ ...row }]);
}
}
const printPackingFun = (row: any, mainRow:any) => {
if (printVerification()) {
getBaoShuTiaoMa(mainRow.id, mainRow.packagingQuantity, mainRow.$index, row.$index);
}
};
//
const printThisFun = (row:any) => {
if(row.children.length){
dataExtractFun(row.children);
} else {
ElMessageBox({
closeOnClickModal: false,
closeOnPressEscape: false,
title: t('message.index.prompt'),
message: '确定要进行不分包装打印吗?',
confirmButtonText: t('message.index.confirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
buttonSize: 'default',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
let arr = []
for (let i = 0; i < row.qty; i++){
arr.push({...row,packagingQuantity:1,tiaoMa:row.tiaoMa})
}
dataExtractFun(arr);
done()
} else {
done();
}
},
});
const printThisFun = (row: any) => {
if(printVerification()){
getBaoShuTiaoMa(row.id, row.packagingQuantity, row.$index);
}
}
///
const dataExtractFun = (list: any = []) => {
let stepCounter = 0;
state.timer = setInterval(() => {
if (state.printSelection === '0') {
LODOP.PRINT_INITA(0, 0, 0, 0, 'L4');
LODOP.SET_PRINT_PAGESIZE(1, 1000, 1000, '');
AddPrintContentZhuhai(list[stepCounter]);
// LODOP.PREVIEW();
};
//
const getBaoShuTiaoMa = async (topId: any, ceseQty: any, i: number, t:number = -1) => {
await listApi()
.setBaoShuTiaoMa({ id: topId, cuseQty: ceseQty })
.then((res: any) => {
res.data.barCodeList.forEach((item:any) => {
item.purchaseOrderFBillNo = item.purchaseBillNo
item.packagingQuantity = item.qty
item.quantityPerPackage = item.sortNum
})
if(t === -1){
state.data[i].children = res.data.barCodeList
dataExtractFun(state.data[i].children);
} else {
state.data[i].children = res.data.barCodeList
dataExtractFun([state.data[i].children[t]]);
}
LODOP.PRINT();
} else {
LODOP.PRINT_INITA(0, 0, 0, 0, 'L4');
LODOP.SET_PRINT_PAGESIZE(1, 1000, 1000, '');
AddPrintContentTaiguo(list[stepCounter]);
LODOP.PRINT();
}
if (list.length - 1 == stepCounter) {
clearInterval(state.timer);
state.timer = null;
state.printState = '0'
}
stepCounter++
}, 2000);
});
};
//
const dataExtractFun = (list: any = []) => {
let stepCounter = 0;
state.printState = '1';
state.timer = setInterval(() => {
if (state.printSelection === '0') {
LODOP.PRINT_INITA(0, 0, 0, 0, 'L4');
LODOP.SET_PRINT_PAGESIZE(1, 1000, 500, '');
AddPrintContentZhuhai(list[stepCounter]);
LODOP.PRINT();
} else {
LODOP.PRINT_INITA(0, 0, 0, 0, 'L4');
LODOP.SET_PRINT_PAGESIZE(1, 1000, 500, '');
AddPrintContentTaiguo(list[stepCounter]);
LODOP.PRINT();
}
if (list.length - 1 == stepCounter) {
clearInterval(state.timer);
state.timer = null;
state.printState = '0';
}
stepCounter++;
}, 2000);
};
//
const AddPrintContentZhuhai = (row: any) => {
let obj = row
state.data.forEach((item:any) => {
if(item.purchaseOrderFBillNo === obj.purchaseOrderFBillNo){
obj.tiaoMa = item.tiaoMa
}
})
LODOP.ADD_PRINT_BARCODE(125, 25, 150, 150, 'QRCode', obj.tiaoMa);
LODOP.ADD_PRINT_TEXT(125, 155, 300, 20, `供应商简称:${obj.supplierName}`);
LODOP.ADD_PRINT_TEXT(145, 155, 300, 20, `物料编码:${obj.materialCode}`);
LODOP.ADD_PRINT_TEXT(165, 155, 300, 20, `包装数量:${obj.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(185, 155, 300, 20, `美塞斯批号:${obj.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(205, 155, 300, 20, `供应商批号:${obj.fSupplierLot}`);
LODOP.ADD_PRINT_TEXT(225, 155, 300, 20, `采购订单号:${obj.purchaseOrderFBillNo}`);
LODOP.ADD_PRINT_TEXT(245, 155, 300, 20, `送货日期:${state.indexRow.deliveryDate}`);
LODOP.ADD_PRINT_TEXT(265, 155, 300, 20, `收料通知单单号:${state.indexRow.fBillNo}`);
LODOP.ADD_PRINT_BARCODE(25, 15, 150, 150, 'QRCode', row.fBarCode);
LODOP.ADD_PRINT_TEXT(10, 160, 300, 20, `供应商简称:${row.supplierName}`);
LODOP.ADD_PRINT_TEXT(30, 160, 300, 20, `物料编码:${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(50, 160, 300, 20, `包装数量:${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(70, 160, 300, 20, `美塞斯批号:${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(90, 160, 300, 20, `供应商批号:${row.fSupplierLot}`);
LODOP.ADD_PRINT_TEXT(110, 160, 300, 20, `采购订单号:${row.purchaseOrderFBillNo}`);
LODOP.ADD_PRINT_TEXT(130, 160, 300, 20, `送货日期:${state.indexRow.deliveryDate}`);
LODOP.ADD_PRINT_TEXT(150, 160, 300, 20, `收料通知单单号:${state.indexRow.fBillNo}`);
};
//
const AddPrintContentTaiguo = (row: any) => {
let obj = row
state.data.forEach((item:any) => {
if(item.purchaseOrderFBillNo === obj.purchaseOrderFBillNo){
obj.tiaoMa = item.tiaoMa
}
})
LODOP.ADD_PRINT_BARCODE(125, 25, 150, 150, 'QRCode', obj.tiaoMa);
LODOP.ADD_PRINT_TEXT(125, 155, 300, 20, `物料编码:${obj.materialCode}`);
LODOP.ADD_PRINT_TEXT(145, 155, 300, 20, `包装数量:${obj.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(165, 155, 300, 20, `美塞斯批号:${obj.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(185, 155, 300, 20, `供应商批号:${obj.fSupplierLot}`);
LODOP.ADD_PRINT_BARCODE(25, 15, 150, 150, 'QRCode', row.fBarCode);
LODOP.ADD_PRINT_TEXT(28, 160, 300, 20, `物料编码:${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(58, 160, 300, 20, `包装数量:${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(88, 160, 300, 20, `美塞斯批号:${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(118, 160, 300, 20, `供应商批号:${row.fSupplierLot}`);
};
//
//
const inputNumberFun = (e: any, row: any) => {
if (e <= 1 || e > row.packagingQuantity) {
if (e < 1 || e > row.packagingQuantity) {
state.data = state.data.map((item: any) =>
item.id === row.id
? {
@ -291,11 +308,15 @@ const inputNumberFun = (e: any, row: any) => {
child.quantityPerPackage = i + 1;
child.printBtn = '打印此包装';
child.supplierName = item.supplierName
console.log(item)
console.log(child)
if (i === packages - 1 && item.qty % e !== 0) {
child.packagingQuantity = item.qty % e;
child.qty = child.packagingQuantity
} else {
child.packagingQuantity = e;
child.qty = child.packagingQuantity
}
return child;
});
@ -304,46 +325,44 @@ const inputNumberFun = (e: any, row: any) => {
};
//
const openShowDataFun = (row: any) => {
if(LODOP === undefined){
ElNotification({
title: '提示',
message: '检测到无打印插件,正在下载',
type: 'warning',
duration: 0,
position:'top-left'
})
const userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.includes('windows')) {
window.location.href ='http://58.252.252.77:8085/CLodop_Setup_for_Win64NT_6.623EN.exe'
} else if (userAgent.includes('mac')) {
ElNotification({
title: '提示',
message: 'MAC无打印配置',
type: 'error',
duration: 0,
position:'top-left'
})
}
} else {
state.indexRow = row;
state.formData.sheet = row.sheet;
listApi()
.invoiceOrderGetPageList({ condition: state.formData, pageSize: 100000, page: 1 })
.then((res: any) => {
LODOP.SELECT_PRINTER();
if (res.resultCode === 0) {
state.data = res.data.dataList;
state.data.forEach((item: any) => {
item.packagingQuantity = 1;
item.quantityPerPackage = item.qty;
item.children = [];
item.printBtn = '打印条码';
});
state.show = true;
}
});
}
if (LODOP === undefined) {
ElNotification({
title: '提示',
message: '检测到无打印插件,正在下载',
type: 'warning',
duration: 0,
position: 'top-left',
});
const userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.includes('windows')) {
window.location.href = 'http://58.252.252.77:8085/CLodop_Setup_for_Win64NT_6.623EN.exe';
} else if (userAgent.includes('mac')) {
ElNotification({
title: '提示',
message: 'MAC无打印配置',
type: 'error',
duration: 0,
position: 'top-left',
});
}
} else {
state.indexRow = row;
state.formData.sheet = row.sheet;
listApi()
.invoiceOrderGetPageList({ condition: state.formData, pageSize: 100000, page: 1 })
.then((res: any) => {
if (res.resultCode === 0) {
state.data = res.data.dataList;
state.data.forEach((item: any) => {
item.packagingQuantity = item.qty;
item.quantityPerPackage = 1;
item.children = [];
item.printBtn = '打印条码';
});
state.show = true;
}
});
}
};
const closeFun = () => {
state.show = false;
@ -354,6 +373,15 @@ defineExpose({
});
</script>
<style scoped lang="scss">
.multi-line-omit {
word-break: break-all; //
text-overflow: ellipsis; //
overflow: hidden; //
display: -webkit-box; //
-webkit-line-clamp: 1; //
-webkit-box-orient: vertical; // --
}
:deep(.avue-crud__right) {
display: none;
}
@ -368,6 +396,18 @@ defineExpose({
box-sizing: border-box;
padding: 0 0 0 60px;
:deep(.avue-crud__header) {
display: none !important;
}
:deep(.el-card) {
padding: 0 !important;
}
:deep(.el-table__header-wrapper) {
display: none;
}
.expandItem {
width: 100%;
height: 30px;

View File

@ -109,6 +109,7 @@ const state = reactive({
height: computed(() => window.innerHeight - window.innerHeight * 0.25 + ''),
sortable: true,
tip: false,
rowSort: false,
index: false,
menuWidth: 120,
border: true,
@ -122,18 +123,18 @@ const state = reactive({
column: [
{ label: '', prop: 'checkboxBox', width: 35 },
{ label: computed(() => t('message.index.deliveryDate')), prop: 'deliveryDate' },
{ label: computed(() => t('message.index.deliveryNote')), prop: 'sheet', width: '135' },
{ label: '收料通知单单号', prop: 'fBillNo', width: '135' },
{ label: computed(() => t('message.index.deliveryNoteNumber2')), prop: 'sheet', width: '135' },
{ label: computed(() => t('message.index.sltzddh')), prop: 'fBillNo', width: '135' },
{ label: computed(() => t('message.index.PO1')), prop: 'purchaseOrderFBillNo', width: '135' },
{ label: computed(() => t('message.index.maxcessLot')), prop: 'mssSupplierLot' },
{ label: computed(() => t('message.index.maxcessLot')), prop : 'mssSupplierLot' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName' },
{ label: computed(() => t('message.index.supplierCode')), prop: 'supplierId', width: '90' },
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName', width: '120' },
{ label: computed(() => t('message.index.supplierCode')), prop: 'supplierId', width: '90',hide: true, },
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName', width: '120',hide: true, },
// { label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '110' },
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'qty' },
{ label: computed(() => t('message.index.POQTY')), prop: 'purchaseQty' },
// { label: computed(() => t('message.index.POQTY')), prop: 'purchaseQty' },
{ label: computed(() => t('message.index.unit')), prop: 'unitName' },
{ label: computed(() => t('message.index.print')), prop: 'print', width: 80 },
{ label: computed(() => t('message.index.deleteText')), prop: 'deleteText', width: 80 },
@ -264,7 +265,9 @@ onMounted(() => {console.log( window.LODOP)});
:deep(.el-checkbox) {
height: 15px !important;
}
:deep(.avue-crud__refreshBtn) {
display: none;
}
:deep(.cell) {
padding: 0 !important;
}

View File

@ -1,57 +1,6 @@
<template>
<div class="system-user-container layout-padding">
<el-card class="layout-padding-auto" shadow="hover">
<div class="selectBoxes">
<div class="selectItem">
<el-input v-model="state.formData.fBillNo" style="width: 12vw" :placeholder="t('message.index.DocNumber')" size="default" />
</div>
<div class="selectItem">
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
<el-option v-for="item in state.option.column[9].dicData" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div class="selectItem">
<el-date-picker
v-model="state.elDatePicker"
style="width: 25vw"
type="daterange"
range-separator="-"
:start-placeholder="t('message.index.StartDate')"
:end-placeholder="t('message.index.EndDate')"
size="default"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="elDatePickerFun"
/>
</div>
<div class="selectItem" style="margin-right: 0">
<el-button type="primary" size="default" @click="selectFun">{{ t('message.index.search') }}</el-button>
<el-button size="default" @click="resetFun">{{ t('message.index.reset') }}</el-button>
</div>
<div class="selectItem" style="flex: 1; margin-right: 0">
<div class="piliang">
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.proceed') }}</span>
</el-button>
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('0')"
/>
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
/>
</div>
</div>
</div>
<avue-crud
ref="crudRef"
:data="state.data"
@ -65,14 +14,18 @@
<span v-if="row.ifHidden === 0" @click="toPurchaseDetails(row)" style="cursor: pointer; color: #409eff">{{ row.fBillNo }}</span>
</template>
<template #fDate="{ row }">{{ row.ifHidden === 0 ? row.fDate : '' }}</template>
<template #fPurchaseOrgName="{ row }">{{ row.ifHidden === 0 ? row.fPurchaseOrgName : '' }}</template>
<template #fPurchaseOrgName="{ row }">
<el-tooltip :content="row.fPurchaseOrgName" placement="top" v-if="row.ifHidden === 0 ">
<div class="multi-line-omit">{{ row.fPurchaseOrgName }}</div>
</el-tooltip>
</template>
<template #fCancelStatus="{ row }">
{{ row.ifHidden === 0 ? (row.fCancelStatus === 'A' ? t('message.index.closed') : t('message.index.unclosed')) : '' }}
</template>
<template #materialName="{ row }">
<el-tooltip :content="row.materialName" placement="top">
<div class="multi-line-omit">{{ row.materialName }}</div>
</el-tooltip>
<el-tooltip :content="row.materialName" placement="top">
<div class="multi-line-omit">{{ row.materialName }}</div>
</el-tooltip>
</template>
<template #chengNuoJiaoQi="{ row }">
<el-date-picker
@ -80,7 +33,7 @@
type="date"
:placeholder="t('message.index.date')"
size="small"
style="width: 220px"
style="width: 100%"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:disabled="row.chengNuoJiaoQi != null"
@ -93,13 +46,65 @@
type="date"
:placeholder="t('message.index.date')"
size="small"
style="width: 220px"
style="width: 100%"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="batchSetNewChengNuoJiaoQiFun([{ id: row.id, newTime: row.newChengNuoJiaoQi }])"
/>
</template>
<template #menu-left></template>
<template #menu-left>
<div class="selectBoxes">
<div class="selectItem">
<el-input v-model="state.formData.fBillNo" style="width: 12vw" :placeholder="t('message.index.DocNumber')" size="default" />
</div>
<div class="selectItem">
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
<el-option v-for="item in state.option.column[9].dicData" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div class="selectItem">
<el-date-picker
v-model="state.elDatePicker"
style="width: 25vw"
type="daterange"
range-separator="-"
:start-placeholder="t('message.index.StartDate')"
:end-placeholder="t('message.index.EndDate')"
size="default"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="elDatePickerFun"
/>
</div>
<div class="selectItem" style="margin-right: 0">
<el-button type="primary" size="default" @click="selectFun">{{ t('message.index.search') }}</el-button>
<el-button size="default" @click="resetFun">{{ t('message.index.reset') }}</el-button>
</div>
<div class="selectItem" style="flex: 1; margin-right: 0">
<div class="piliang">
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.proceed') }}</span>
</el-button>
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('0')"
/>
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
/>
</div>
</div>
</div>
</template>
<template #menu="{ row }">
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails(row)">{{ t('message.index.view') }}</el-button>
</template>
@ -127,8 +132,6 @@ import { listApi } from '../../api/list/index';
import { useI18n } from 'vue-i18n';
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
// import { Session } from '/@/utils/storage';
const selectedDataRef = ref();
const { t } = useI18n();
const router = useRouter();
@ -157,10 +160,9 @@ const state = reactive({
addBtn: false,
column: [
{ label: computed(() => t('message.index.DocNumber')), prop: 'fBillNo', searchSpan: 3, width: '125',filters: true },
{ label: '销售订单号', prop: '', searchSpan: 3, width: '125',filters: true },
{ label: '手工销售订单号', prop: '', searchSpan: 3, width: '125',filters: true },
{ label: '采购组织', prop: 'fPurchaseOrgName', searchSpan: 3, width: '125',filters: true },
{ label: computed(() => t('message.index.date1')), prop: 'fDate', type: 'datetime', searchSpan: 6, searchRange: true,filters: true },
{ label: computed(() => t('message.index.khmc')), prop: 'fPurchaseOrgName', searchSpan: 3, width: '165',filters: true },
{ label: computed(() => t('message.index.date1')), prop: 'fDate', type: 'datetime', searchSpan: 6, searchRange: true,width: '125' },
{
label: computed(() => t('message.index.status')),
prop: 'fCancelStatus',
@ -169,13 +171,14 @@ const state = reactive({
{ label: computed(() => t('message.index.unclosed')), value: 'A' },
{ label: computed(() => t('message.index.closed')), value: 'B' },
],
width: '90',
width: '110',
},
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120',filters: true },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240',filters: true },
// { label: computed(() => t('message.index.specification')), prop: 'guige', width: '120',filters: true },
{ label: computed(() => t('message.index.unit')), prop: 'unitName', width: '90',filters: true },
{ label: computed(() => t('message.index.qty')), prop: 'qty', width: '90',filters: true },
{ label: computed(() => t('message.index.xsddh')), prop: 'fdemandbillno', searchSpan: 3, width: '125',filters: true },
{ label: computed(() => t('message.index.sgxsddh')), prop: 'f_TSPR_Text_qtr1', searchSpan: 3, width: '140',filters: true },
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '160',filters: true },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240',filters: true, },
{ label: computed(() => t('message.index.unit')), prop: 'unitName', width: '110',filters: true, },
{ label: computed(() => t('message.index.qty')), prop: 'qty', width: '110',filters: true },
{ label: computed(() => t('message.index.requestDate')), prop: 'fDeliveryDate', width: '165',filters: true },
{
label: computed(() => t('message.index.DocStatus')),
@ -186,12 +189,12 @@ const state = reactive({
{ label: computed(() => t('message.index.normal')), value: 'A' },
{ label: computed(() => t('message.index.closed')), value: 'B' },
],
width: '90',
width: '110',
},
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '130',filters: true },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '150',filters: true },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQty', width: '110',filters: true },
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160',filters: true },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160',filters: true },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '180',filters: true },
],
},
data: [],
@ -422,7 +425,7 @@ onMounted(() => {
<style lang="scss" scoped>
:deep(.avue-crud__header) {
display: none;
//display: none;
}
:deep(.el-button--text) {
@ -435,7 +438,7 @@ onMounted(() => {
}
:deep(.cell) {
padding: 0 !important;
//padding: 0 !important;
}
:deep(.avue-crud__left) {

View File

@ -2,31 +2,7 @@
<div class="system-user-container layout-padding">
<el-card class="layout-padding-auto" shadow="hover">
<div class="selectBoxes">
<div class="selectItem" style="flex: 1;margin-right: 0">
<div class="piliang">
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.proceed') }}</span>
</el-button>
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('0')"
/>
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
/>
</div>
</div>
</div>
<avue-crud
ref="crudRef"
:data="state.data"
@ -69,6 +45,33 @@
@change="batchSetNewChengNuoJiaoQiFun([{id:row.id,newTime:row.newChengNuoJiaoQi}])"
/>
</template>
<template #menu-left>
<div class="selectBoxes">
<div class="selectItem" style="flex: 1;margin-right: 0">
<div class="piliang">
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.proceed') }}</span>
</el-button>
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('0')"
/>
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
size="small"
style="width: 45%; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
/>
</div>
</div>
</div>
</template>
</avue-crud>
</el-card>
<selectedData ref="selectedDataRef" :showes="state.selectedDataShow" :listData="state.selectedData" @generateDocuments="generateDocumentsFun" @close="state.selectedDataShow = false"/>
@ -109,14 +112,11 @@ const state = reactive({
column: [
{ label: computed(() => t('message.index.DocNumber')), prop: 'fBillNo', searchSpan: 3, width: '125' },
{ label: computed(() => t('message.index.date')), prop: 'fDate', type: 'datetime', searchSpan: 6, searchRange: true },
{
label: computed(() => t('message.index.status')),
prop: 'fCancelStatus',
{ label: computed(() => t('message.index.status')), prop: 'fCancelStatus',
dicData: [
{ label: computed(() => t('message.index.closed')), value: 'A' },
{ label: computed(() => t('message.index.unclosed')), value: 'B' },
],
width: '90',
], width: '90',
},
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240' },
@ -131,8 +131,7 @@ const state = reactive({
dicData: [
{ label: computed(() => t('message.index.normal')), value: 'A' },
{ label: computed(() => t('message.index.closed')), value: 'B' },
],
width: '90',
], width: '90',
},
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '110' },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQty', width: '110' },
@ -337,7 +336,7 @@ onMounted(() => {
<style lang="scss" scoped>
:deep(.avue-crud__header) {
display: none;
//display: none;
}
:deep(.el-button--text){
padding: 0 !important;
@ -364,7 +363,7 @@ onMounted(() => {
}
.piliang {
margin-left: 12px;
//margin-left: 12px;
border: 1px solid #d5d5d5;
border-radius: 8px;
flex: 1;

View File

@ -1,9 +1,6 @@
<template>
<el-dialog :model-value="props.showes" @close="closeFun" width="80%">
<div style="display: flex; align-items: center; margin-bottom: 16px">
<div>{{ t('message.index.invoiceNumber') }}</div>
<el-input style="width: 300px" v-model="state.f_VHUB_Text" :placeholder="t('message.index.invoiceNumber')" size="default" />
</div>
<el-dialog :model-value="props.showes" @close="closeFun" width="90%">
<avue-crud ref="crudRef" :data="state.data" :option="state.option">
<template #fSupplierLot="{ row }">
<div style="display: flex; align-items: center; justify-content: center">
@ -18,6 +15,12 @@
<el-input-number v-model="row.notSendQtyText" size="small" />
</div>
</template>
<template #menu-left>
<div style="display: flex; align-items: center; margin-bottom: 16px">
<div>{{ t('message.index.invoiceNumber') }}</div>
<el-input style="width: 300px" v-model="state.f_VHUB_Text" :placeholder="t('message.index.invoiceNumber')" size="default" />
</div>
</template>
</avue-crud>
<div class="btnList">
<el-button type="primary" :loading="state.loading" @click="batchAddInvoiceOrderFun">{{ t('message.index.confirm') }} </el-button>
@ -118,7 +121,7 @@ const batchAddInvoiceOrderFun = () => {
closeOnClickModal: false,
closeOnPressEscape: false,
title: t('message.index.prompt'),
message: t('message.index.deliveryNote') + ':' + res.data,
message: t('message.index.deliveryNoteNumber2') + ':' + res.data,
confirmButtonText: t('message.index.copy'),
showCancelButton: false,
buttonSize: 'default',

View File

@ -52,8 +52,10 @@
<el-select
placeholder="请选择供应商"
size="default"
filterable
style="width: 240px"
v-model="state.ruleForm.supplierId"
@change="BDSupplierListItemChange"
>
<el-option :label="item.text" :value="item.value" v-for="(item, index) of state.BDSupplierList" :key="index" />
@ -140,6 +142,22 @@ const closeDialog = () => {
userDialogFormRef.value.resetFields();
});
};
const filterMethodFun = (val:any) => {
console.log(val)
if(state.BDSupplierList.length){
let arr : any = []
let BDSupplierListFB = [...state.BDSupplierList]
BDSupplierListFB.forEach((item:any) => {
if (val !== ''){
if(item.text.indexOf(val) != -1){
arr.push({item})
}
} else {
}
})
}
}
//
const onCancel = () => {
closeDialog();
@ -172,7 +190,7 @@ const getMenuData = () => {
})
};
//
//
const getFPurchaseOrgListFun = () => {
listApi().getFPurchaseOrgList({}).then((res:any) => {
if (res.resultCode === 0) {