This commit is contained in:
cun-nan 2024-10-15 14:27:49 +08:00
parent 15d9031179
commit 977648f815
5 changed files with 129 additions and 68 deletions

View File

@ -32,7 +32,7 @@ module.exports = {
productionSourceMap: false, productionSourceMap: false,
// webpack-dev-server 相关配置 // webpack-dev-server 相关配置
devServer: { devServer: {
host: '192.168.31.178', host: '0.0.0.0',
port: port, port: port,
open: true, open: true,
proxy: { proxy: {

View File

@ -1,11 +1,10 @@
# \u57FA\u672C\u914D\u7F6E # \u57FA\u672C\u914D\u7F6E
server.port=8080 server.port=8080
env.profile=dev env.profile=dev
#env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/ env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/ #env.properties.path=F:/work/oilSystem/fuintBackend/configure/
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/ #env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure #env.properties.path=D:/work/oilSystem/fuintBackend/configure/
#env.properties.path=D:/Code/yuzhan/oil-station/fuintBackend/configure
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/ #env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
# \u6570\u636E\u5E93\u914D\u7F6E # \u6570\u636E\u5E93\u914D\u7F6E
@ -18,6 +17,7 @@ spring.task.scheduling.pool.size=5
logging.level.com.fuint=info logging.level.com.fuint=info
multipart.max-file-size=20mb multipart.max-file-size=20mb
multipart.max-request-size=20mb multipart.max-request-size=20mb
# \u6700\u5927\u4E0A\u4F20\u6587\u4EF6 # \u6700\u5927\u4E0A\u4F20\u6587\u4EF6
spring.servlet.multipart.max-file-size=10MB spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB spring.servlet.multipart.max-request-size=10MB

View File

@ -411,7 +411,7 @@
width="542px" width="542px"
center center
> >
<accountPending></accountPending> <accountPending :amount="oilGunClearing.amount" @changeAmount="changeAmount"></accountPending>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="accountPending = false"> </el-button> <el-button @click="accountPending = false"> </el-button>
<el-button type="primary" @click="accountPending = false"> </el-button> <el-button type="primary" @click="accountPending = false"> </el-button>
@ -617,7 +617,9 @@ export default {
// //
oilGun: '', oilGun: '',
// //
oilGunClearing: '', oilGunClearing: {
amount:0
},
// //
goodsList: [], goodsList: [],
restaurants: [], restaurants: [],
@ -1803,11 +1805,25 @@ export default {
} }
}, },
changeAmount(val){
console.log(val,1807)
},
/** /**
* 设置选中的支付方式 * 设置选中的支付方式
* @param value * @param value
*/ */
setindex(value) { setindex(value) {
if (value=='after_pay'){
if (this.getGoodsNum>0){
this.$message.error("商品订单不支持挂账")
return
}
if (this.oilGunClearing.amount<=0){
this.$message.error("请选择挂账订单")
return;
}
this.accountPending = true
}
console.log('支付方式',value); console.log('支付方式',value);
this.payType = value this.payType = value
// //

View File

@ -1,43 +1,26 @@
<script > <script>
import {listCreditUnit} from "../../../../api/cashier/creditunit";
export default { export default {
props:['amount'],
data() { data() {
return { return {
ruleForm: { ruleForm: {},
name: '', unitList:[],
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
rules: { rules: {
name: [ unitName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, {required: true, message: '请输入挂账单位名称', trigger: 'blur'},
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
], ],
region: [ amount: [
{ required: true, message: '请选择活动区域', trigger: 'change' } {required: true, message: '请输入活动名称', trigger: 'blur'},
], ],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
date2: [
{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }
],
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
resource: [
{ required: true, message: '请选择活动资源', trigger: 'change' }
],
desc: [
{ required: true, message: '请填写活动形式', trigger: 'blur' }
]
} }
}; };
}, },
created() {
this.getUnitList()
this.ruleForm.amount = this.amount
},
methods: { methods: {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
@ -51,45 +34,107 @@ export default {
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
} },
//
getUnitList() {
let obj = {};
let _this = this;
listCreditUnit().then(response => {
response.data.forEach(item => {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
_this.unitList.push(obj)
})
})
},
//
changeUnit(val) {
this.ruleForm.creditUnitId = val.id;
this.ruleForm.creditLimit = val.creditLimit
this.ruleForm.residueCreditLimit = val.residueCreditLimit
this.$emit('changeAmount',this.ruleForm)
return val.id
},
async querySearch1(queryString, cb) {
await this.getUnitList();
let _this = this;
let obj = {};
let results = _this.unitList
if (queryString) {
_this.unitList.forEach(item => {
results = [];
if (item.unitName.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.personCredit.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.contactMobile.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
})
}
cb(results);
},
changeAmount(){
this.$emit('changeAmount',this.ruleForm)
this.$forceUpdate()
},
} }
} }
</script> </script>
<template> <template>
<div> <div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="挂账单位" prop="region" style="width: 396px"> <el-form-item label="挂账单位" prop="unitName">
<el-select v-model="ruleForm.region" placeholder="请选择挂账单位"> <el-autocomplete
<el-option label="挂账单位一" value="shanghai"></el-option> popper-class="my-autocomplete"
<el-option label="挂账单位二" value="beijing"></el-option> v-model="ruleForm.unitName"
</el-select> :fetch-suggestions="querySearch1"
</el-form-item> :trigger-on-focus="false"
<el-form-item label="可用额度" prop="name" style="width: 396px"> style="width: 100%"
<el-input v-model="ruleForm.name"> placeholder="请选择挂账单位"
<template slot="append"></template> @select="changeUnit">
</el-input> <template slot-scope="{ item }">
<div class="hui-size">可用额度为挂账人的最大可用额度,如挂账金额大于可用额度,将无法进行挂账</div> <div style="display: flex;justify-content: space-between">
</el-form-item> {{ item.unitName }}{{ item.personCredit }} {{ item.contactMobile }}
<el-form-item label="挂帐金额" prop="name" style="width: 396px"> </div>
<el-input v-model="ruleForm.name"> </template>
<template slot="append"></template> </el-autocomplete>
</el-input> </el-form-item>
</el-form-item> <el-form-item label="可用额度" prop="residueCreditLimit">
<el-input v-model="ruleForm.residueCreditLimit" disabled>
<template slot="append"></template>
</el-input>
<div class="hui-size">可用额度为挂账人的最大可用额度,如挂账金额大于可用额度,将无法进行挂账</div>
</el-form-item>
<el-form-item label="挂帐金额" prop="amount">
<el-input v-model="ruleForm.amount" @input="changeAmount()">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="备注" prop="desc" style="width: 396px"> <el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="ruleForm.desc"></el-input> <el-input type="textarea" v-model="ruleForm.remark"></el-input>
</el-form-item> </el-form-item>
<el-form-item> </el-form>
</div>
</el-form-item>
</el-form>
</div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.hui-size{ .hui-size {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
} }

View File

@ -5,8 +5,8 @@ module.exports = {
// baseUrl: 'https://www.tuofeng.cc/oilAdmin/', // baseUrl: 'https://www.tuofeng.cc/oilAdmin/',
// baseUrl: 'https://oilapi.youkerr.com/oilAdmin/', // baseUrl: 'https://oilapi.youkerr.com/oilAdmin/',
// baseUrl: 'https://8q4f124343.yicp.fun/', // baseUrl: 'https://8q4f124343.yicp.fun/',
// baseUrl: 'http://192.168.31.95:8080/', baseUrl: 'http://47.94.122.58:8080/',
baseUrl: 'http://localhost:8080/', // baseUrl: 'http://localhost:8080/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc', // baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc', imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息 // 应用信息