内容完善

This commit is contained in:
18538855543 2023-06-19 16:26:39 +08:00
parent 20f7b36d6d
commit 4185cde3aa
3 changed files with 388 additions and 293 deletions

View File

@ -16,4 +16,12 @@ export function supplierLogin(data) {
})
}
export function save(data) {
return request({
url: 'http://1.14.142.111:9090/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc',
method: 'post',
data
})
}

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div div style="font-size:25px;text-align:left ; position:relative;">
<el-button v-if="view" type="primary">
<el-button v-if="view" type="primary" @click="save()">
{{ '保存' }}
</el-button>
<el-button v-if="view" type="primary">
@ -16,8 +16,8 @@
</div>
<el-row>
<el-col :span="8">
<el-form-item label='报价单号' prop="FBillNo">
<el-input v-model="ruleFrom.FBillNo" readonly ></el-input>
<el-form-item label='报价单号' prop="FBILLNO">
<el-input v-model="ruleFrom.FBILLNO" readonly ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -38,8 +38,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应商名称" prop="FSupplierName">
<el-input maxlength="64" v-model="ruleFrom.FSupplierName" readonly></el-input>
<el-form-item label="供应商名称" prop="FSupplierIdName">
<el-input maxlength="64" v-model="ruleFrom.FSupplierIdName" readonly></el-input>
</el-form-item>
</el-col>
@ -137,7 +137,7 @@
<div>
<el-table
:key="tableKey"
:data="SalaryItemList1"
:data="list"
border
fit
highlight-current-row
@ -145,11 +145,7 @@
max-height="500px"
style="width: 100%"
>
<el-table-column label="序号" align="center" width="50" fixed="left">
<template slot-scope="{row,$index}">{{ $index == listQuery.pageSize -1 ? ($index+1) * listQuery.currentPage :
listQuery.currentPage == 1? ($index+1) : ($index+1)+listQuery.pageSize*(listQuery.currentPage-1)}}
</template>
</el-table-column>
<el-table-column prop="FSEQ" label="序号" align="center" width="50" fixed="left"></el-table-column>
<el-table-column
prop="FMaterialId"
label="物料代码"
@ -158,7 +154,7 @@
align="center">
</el-table-column>
<el-table-column
prop="FMaterialName"
prop="FName"
label="物料名称"
min-width="150"
align="center">
@ -188,6 +184,7 @@
align="center">
<template slot-scope="scop">
<el-input type="number" v-model="scop.row.FPrice" v-show="!priceInput" @blur="yearPaymentAmtBlur(scop.row.yearPaymentAmt,scop.$index,'SalaryItemList1',scop.row.timesPerYear)" :disabled="status==='9'"></el-input>
<span v-show="priceInput">{{ scop.row.FPrice }}</span>
</template>
</el-table-column>
<el-table-column
@ -202,7 +199,8 @@
min-width="110"
align="center">
<template slot-scope="scop">
<el-input type="number" v-model="scop.row.FTaxPrice" v-show="priceInput" @blur="yearPaymentAmtBlur(scop.row.yearPaymentAmt,scop.$index,'SalaryItemList1',scop.row.timesPerYear)" :disabled="status==='9'"></el-input>
<el-input type="number" v-model="scop.row.FTaxPrice" v-show="priceInput" :disabled="status==='9'"></el-input>
<span v-show="!priceInput">{{ scop.row.FTaxPrice }}</span>
</template>
</el-table-column>
<el-table-column
@ -227,7 +225,7 @@
<script>
import {supplierLogin} from "@/api/login";
import {save, supplierLogin} from "@/api/login";
export default {
name: "master",
@ -245,8 +243,8 @@ export default {
StartRow:"0",
Limit:100
},
FieldKeysMaster:'Fid,FSrcBillNo, FProjectName, FBILLNO ,FDocumentStatus, FDATE, FOpenDate, FExpiryDate,FQuoteDate, FBuyer, FSupplierId.FNumber,FSupplierId.FName, FPriceStatus, FContact ,FPhone ,FMail, FCurrId, FIsIncludedTax, FIsConfirm, FConfirmDate',
FieldKeysslave:'FEntity_FSEQ,FEntity_FEntryID, FMATERIALID.FNumber,FMaterialId.FName, FUnitID.FName, FQty, FPrice, FTaxRate, FTaxPrice, FPayConditionId, FNote, FSourceBillNo, FSrcId, FSrcEntryId, FSrcSeq',
FieldKeysMaster:'Fid,FSrcBillNo, FProjectName, FBILLNO , FDATE, FOpenDate, FExpiryDate,FQuoteDate, FBuyer, FSupplierId.FNumber,FSupplierId.FName, FPriceStatus, FContact ,FPhone ,FMail, FCurrId, FIsIncludedTax, FIsConfirm, FConfirmDate',
FieldKeysslave:'FEntity_FSEQ,FEntity_FEntryID, FMATERIALID.FNumber,FMaterialId.FName, FUnitID.FName, FQty, FPrice, FTaxRate, FTaxPrice, FPayConditionId, FNote',
tableKey: 0,
customerId:undefined,
status:undefined,
@ -303,12 +301,23 @@ export default {
type:undefined,
},
ruleFrom: {
id: undefined,
//
type: undefined,
//
contractSalaryItemList: [],
staffs: [],
},
saveFrom: {
Creator: "String",
NeedUpDateFields: [],
IsAutoSubmitAndAudit: true,
Model: {
FID: '',
//
FIsConfirm: true,
//
FConfirmDate: '',
//
FQuoteDate: '',
//FEntryID IDFQty FPrice FTaxRate FTaxPrice
FEntity: []
}
},
options: [{
value: 1,
@ -355,7 +364,8 @@ export default {
},
created() {
this.data.FilterString='FBILLNO like\'%' + this.$route.query.FBILLNO +'\''
this.Obj();
this.ruleFromData();
this.listData();
},
computed: {
monthlyTotal() {
@ -453,22 +463,195 @@ export default {
ruleFromData(){
this.data.FieldKeys=this.FieldKeysMaster
supplierLogin(this.data).then(res =>{
// const template = {Fid:'', FBillNo:'', FProjectName:'', FSrcBillNo:'',FSupplierId:'',FSupplierName:'', FDocumentStatus:'', FDATE:'', FOpenDate:'', FExpiryDate:'', FQuoteDate:'', FBuyer:'', FSupplierId:{FNumber:'', FName:''}, FPriceStatus:'', FContact:'', FPhone:'', FMail:'', FCurrId:'', FIsIncludedTax:'', FIsConfirm:'', FConfirmDate:''};;
const template = {Fid:'', FSrcBillNo:'', FProjectName:'', FBILLNO:'',FSupplierId:'',FSupplierName:'', FOpenDate:'', FPriceStatus:'', FQuoteDate:'', FExpiryDate:'', FContact:'', FPhone:'', FMail:'', FCurrId:'', FIsIncludedTax:'',};
const obj = {
Fid: res[0][0],
FSrcBillNo: res[0][1],
FProjectName: res[0][2],
FBILLNO: res[0][3],
FDATE: res[0][4],
FOpenDate: res[0][5],
FExpiryDate: res[0][6],
FQuoteDate: res[0][7],
FBuyer: res[0][8],
FSupplierId: res[0][9],
FSupplierIdName: res[0][10],
FPriceStatus: res[0][11],
FContact: res[0][12],
FPhone: res[0][13],
FMail: res[0][14],
FCurrId: '人民币',
FIsIncludedTax: res[0][16],
FIsConfirm: res[0][17],
FConfirmDate: res[0][18],
}
this.ruleFrom=obj;
})
},
listData(){
this.data.FieldKeys=this.FieldKeysslave
supplierLogin(this.data).then(res =>{
for (let i=0;i<res.length;i++){
const obj = {
FSEQ : res[i][0],
FEntryID : res[i][1],
FMaterialId : res[i][2],
FName : res[i][3],
FUnitID : res[i][4],
FQty : res[i][5],
FPrice : res[i][6],
FTaxRate : res[i][7],
FTaxPrice : res[i][8],
FPayConditionId : res[i][9],
FNote : res[i][10],
}
this.list.push(obj);
}
})
},
save(){
let Model={
FID: this.ruleFrom.Fid,
//
FIsConfirm: true,
//
FConfirmDate: new Date(),
//
FQuoteDate: '',
//FEntryID IDFQty FPrice FTaxRate FTaxPrice
FEntity: []
}
for (let i=0;i<this.list.length;i++){
let data={}
data.FEntryID=this.list[i].FEntryID
data.FQty=this.list[i].FQty
data.FPrice=this.list[i].FPrice
data.FTaxRate=this.list[i].FTaxRate
data.FTaxPrice=this.list[i].FTaxPrice
Model.FEntity.push(data);
}
this.saveFrom.Model=Model
save(this.saveFrom).then(res=>{
this.$message({
message: message,
type: '添加成功',
duration: 2000
})
})
},
Obj(){
const template = {name:'', age:'', no:''};
const arr = [1, 1, 1];
const result = arr.map(item => {
const obj = {...template};
obj.name = item.toString();
obj.age = item.toString();
obj.no = item.toString();
return obj;
});
console.log(result);
console.log(this.data);
let data=[
[
1,
100011,
"1.01.001.0005",
"摄像头镜片",
"Pcs",
134.0000000000,
9.4827590000,
16.0000000000,
11.0000000000,
229310,
" "
],
[
2,
100012,
"1.01.001.0057",
"侧板-50KW系列",
"Pcs",
156.0000000000,
10.3448280000,
16.0000000000,
12.0000000000,
229310,
" "
],
[
3,
100013,
"1.01.001.0002",
"面壳",
"Pcs",
100.0000000000,
11.2068970000,
16.0000000000,
13.0000000000,
229310,
" "
]
]
console.log(data)
const template = {FSEQ:'', FEntryID:'', FMaterialId:'',FName:'', FUnitID:'',FQty:'',FPrice:'', FTaxRate:'', FTaxPrice:'',FPayConditionId:'', FNote:''};
for (let i=0;i<data.length;i++){
const obj = {
FSEQ : data[i][0],
FEntryID : data[i][1],
FMaterialId : data[i][2],
FName : data[i][3],
FUnitID : data[i][4],
FQty : data[i][5],
FPrice : data[i][6],
FTaxRate : data[i][7],
FTaxPrice : data[i][8],
FPayConditionId : data[i][9],
FNote : data[i][10],
}
this.list.push(obj);
}
console.log(this.list)
},
Obj1(){
let data=
[
[
100005,
"XJ23060001",
"测试密封报价",
"BJ23060004",
"2023-06-13T00:00:00",
"2023-06-28T00:00:00",
"2023-06-26T00:00:00",
null,
158053,
"VEN000011",
"美华公司",
"A",
" ",
" ",
" ",
1,
true,
false,
null
]
]
FieldKeysMaster:'Fid,FSrcBillNo, FProjectName, FBILLNO , FDATE, FOpenDate, FExpiryDate,FQuoteDate, FBuyer, FSupplierId.FNumber,FSupplierId.FName, FPriceStatus, FContact ,' +
'FPhone ,FMail, FCurrId, FIsIncludedTax, FIsConfirm, FConfirmDate';
const obj = {
Fid: data[0][0],
FSrcBillNo: data[0][1],
FProjectName: data[0][2],
FBILLNO: data[0][3],
FDATE: data[0][4],
FOpenDate: data[0][5],
FExpiryDate: data[0][6],
FQuoteDate: data[0][7],
FBuyer: data[0][8],
FSupplierId: data[0][9],
FSupplierIdName: data[0][10],
FPriceStatus: data[0][11],
FContact: data[0][12],
FPhone: data[0][13],
FMail: data[0][14],
FCurrId: '人民币',
FIsIncludedTax: data[0][16],
FIsConfirm: data[0][17],
FConfirmDate: data[0][18],
}
this.ruleFrom=obj;
console.log(this.ruleFrom)
},
},
}

View File

@ -9,100 +9,4 @@ module.exports = defineConfig({
// port: 'http://1.14.142.111:9090'
// }
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: '格致微服务平台',
resolve: {
alias: {
'@': resolve('src'),
'vue$': 'vue/dist/vue.esm.js'
}
}
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload
// it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [
{
rel: 'preload',
// to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
}
])
// when there are many pages, it will cause too many meaningless requests
config.plugins.delete('prefetch')
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
// set preserveWhitespace
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
})
.end()
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
}
)
}
});