Browse Source

销售订单

zhanglei
Zhao Qiqi 3 years ago
parent
commit
6e5406d6cc
  1. 7
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xiaoshouzhengce.vue
  2. 56
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xunidingdanguanli.vue
  3. 114
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
  4. 4
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue

7
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xiaoshouzhengce.vue

@ -77,7 +77,7 @@
class="pagination" @pagination="getList"/> class="pagination" @pagination="getList"/>
</div> </div>
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" <el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/> <el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> <el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/>
@ -398,9 +398,9 @@ export default {
bb.push(element.depositBillTypeKey) bb.push(element.depositBillTypeKey)
}); });
this.sids = aa this.sids = aa
this.billType = bb // this.billType = bb
console.log('选择sid', this.sids) console.log('选择sid', this.sids)
console.log('选择订单类型', this.billType) // console.log('', this.billType)
}, },
// ID // ID
handleDelete() { handleDelete() {
@ -440,6 +440,7 @@ export default {
// //
handleConfirm() { handleConfirm() {
this.$emit('handleYouhui',this.row) this.$emit('handleYouhui',this.row)
this.$refs.multipleTable.clearSelection();
this.handleReturn() this.handleReturn()
}, },
// //

56
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xunidingdanguanli.vue

@ -14,12 +14,12 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="130px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="130px" class="tab-header">
<el-form-item label="客户(付款人)"> <el-form-item label="客户(付款人)">
<el-input v-model="listQuery.params.customerName" placeholder="请输入" clearable class="filter-item"/> <el-input v-model="listQuery.params.draweeName" placeholder="请输入" clearable class="filter-item"/>
</el-form-item> </el-form-item>
<el-form-item label="创建日期"> <el-form-item label="创建日期">
<div class="block"> <div class="block">
<el-date-picker <el-date-picker
v-model="listQuery.params.startTime" v-model="listQuery.params.createDateStart"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -29,7 +29,7 @@
<label></label> <label></label>
<div class="block"> <div class="block">
<el-date-picker <el-date-picker
v-model="listQuery.params.endTime" v-model="listQuery.params.createDateEnd"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -54,17 +54,17 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/> <el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> <el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="150px" label="操作" align="center"> <!-- <el-table-column width="150px" label="操作" align="center">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<div class="searchbtns"> <!-- <div class="searchbtns">-->
<el-button size="small" type="primary" <!-- <el-button size="small" type="primary"-->
:disabled="scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true" <!-- :disabled="scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true"-->
@click="changeNodeState(scope.row)">办理 <!-- @click="changeNodeState(scope.row)">办理-->
</el-button> <!-- </el-button>-->
<el-button size="small" type="primary" @click="handleCheck(scope.row)">查看</el-button> <!-- <el-button size="small" type="primary" @click="handleCheck(scope.row)">查看</el-button>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.nodeState }}</span> <span>{{ scope.row.nodeState }}</span>
@ -166,13 +166,18 @@ export default {
current: 1, current: 1,
size: 20, size: 20,
params: { params: {
createDateEnd: '', //
createDateStart: '', //
customerSid: '', // sid
draweeName: '', //
staffSid: window.sessionStorage.getItem('staffSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
orgName: '', orgName: '',
staffName: '', staffName: '',
customerName: '', customerName: '',
billType: '', billType: '',
startTime: '', // startTime: '',
endTime: '', // endTime: '',
}, },
}, },
submitDto: { submitDto: {
@ -188,7 +193,8 @@ export default {
temp: {}, // temp: {}, //
visible: true, visible: true,
hetongdanganguanliInfoShow: false, hetongdanganguanliInfoShow: false,
row:[],// row: [],//
xuniIndex: '',
// ------------------------------------ // ------------------------------------
} }
}, },
@ -239,9 +245,14 @@ export default {
handleCreate() { handleCreate() {
this.dialogVisible = true this.dialogVisible = true
}, },
showXuni(customerSid, index) {
this.listQuery.params.customerSid = customerSid
this.xuniIndex = index
this.getList()
},
// //
handleConfirm() { handleConfirm() {
this.$emit('handleXuniList', this.row) this.$emit('handleXuniList', this.row, this.xuniIndex)
this.handleReturn() this.handleReturn()
}, },
// //
@ -312,11 +323,10 @@ export default {
current: this.listQuery.current, current: this.listQuery.current,
size: this.listQuery.size, size: this.listQuery.size,
params: { params: {
// orgName: this.listQuery.orgName, createDateEnd: this.listQuery.params.createDateEnd, //
// staffName: this.listQuery.staffName, createDateStart: this.listQuery.params.createDateStart, //
customerName: this.listQuery.customerName, customerSid: this.listQuery.params.customerSid, // sid
startTime: this.listQuery.startTime, draweeName: this.listQuery.params.draweeName, //
endTime: this.listQuery.endTime,
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
staffSid: window.sessionStorage.getItem('staffSid') staffSid: window.sessionStorage.getItem('staffSid')
}, },

114
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue

@ -201,7 +201,7 @@
<el-col :span="20"> <el-col :span="20">
<!--放置五个车架号--> <!--放置五个车架号-->
<el-form-item> <el-form-item>
<div v-for="(item,index) in temp.busSalesOrderVehicleList"> <div class="linkNoSty" v-for="(item,index) in temp.busSalesOrderVehicleList">
<span>{{ item.linkNo }}</span> <span>{{ item.linkNo }}</span>
<el-button size="small" type="danger" @click="delXianche(index)">删除 <el-button size="small" type="danger" @click="delXianche(index)">删除
</el-button> </el-button>
@ -216,7 +216,7 @@
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item> <el-form-item>
<div v-for="(item,index) in temp.busSalesVehicleOrderList"> <div class="linkNoSty" v-for="(item,index) in temp.busSalesVehicleOrderList">
<span>{{ item.linkNo }}</span> <span>{{ item.linkNo }}</span>
<el-button size="small" type="danger" @click="delCaigou(index)">删除 <el-button size="small" type="danger" @click="delCaigou(index)">删除
</el-button> </el-button>
@ -380,10 +380,14 @@
<el-col :span="2"> <el-col :span="2">
<span>台数</span> <span>台数</span>
</el-col> </el-col>
<el-col :span="4"> <el-col v-show="isXuanzeShow == '1' || isXuanzeShow == '2'" :span="4">
<el-form-item>
<span>{{ NumberMulThree() }}</span>
</el-form-item>
</el-col>
<el-col v-show="isXuanzeShow == '3'" :span="4">
<el-form-item> <el-form-item>
<span v-show="isXuanzeShow == '1' || isXuanzeShow == '2'">{{ NumberMulThree() }}</span> <el-input v-model="quantity" class="addinputw"
<el-input v-show="isXuanzeShow == '3'" v-model="temp.busSalesOrderPrice.quantity" class="addinputw"
placeholder="请输入台数" placeholder="请输入台数"
clearable/> clearable/>
</el-form-item> </el-form-item>
@ -433,7 +437,10 @@
<el-table-column label="序号" type="index" width="80" align="center"/> <el-table-column label="序号" type="index" width="80" align="center"/>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="small" @click="deleteZhuche(scope.row)">删除</el-button> <el-button type="danger" size="small"
@click="deleteZhuche(scope.row,scope.$index,temp.busSalesOrderDiscountList[scope.$index])">
删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优惠名称" align="center"> <el-table-column label="优惠名称" align="center">
@ -564,7 +571,7 @@
</div> </div>
<!-- ==================== 虚拟订单列表 ======================================== --> <!-- ==================== 虚拟订单列表 ======================================== -->
<div v-show="temp.busSalesOrderDeposit.depositTypeKey == '2'"> <div v-show="temp.busSalesOrderDeposit.depositTypeKey == '02'">
<div class="titleleft"> <div class="titleleft">
<span>虚拟订单列表</span> <span>虚拟订单列表</span>
<el-button class="btntopblueline chooseForm" size="small" type="primary" @click="addXunidingjin()">添加 <el-button class="btntopblueline chooseForm" size="small" type="primary" @click="addXunidingjin()">添加
@ -575,14 +582,16 @@
<el-table-column label="序号" type="index" width="80" align="center"/> <el-table-column label="序号" type="index" width="80" align="center"/>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="small" @click="deleteXuni(scope.row)">删除</el-button> <el-button type="danger" size="small"
@click="deleteXuni(scope.row,scope.$index,temp.busDepositFictitiousList[scope.$index])">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="虚拟订单编号" align="center"> <el-table-column label="虚拟订单编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.depositBillNo }}</span> <span>{{ scope.row.depositBillNo }}</span>
<el-button type="primary" size="small" class="btntopblueline chooseForm" <el-button type="primary" size="small" class="btntopblueline chooseForm"
@click="openXunidingdanList()">选择 @click="openXunidingdanList(scope.$index)">选择
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -943,6 +952,7 @@ export default {
staffSid: window.sessionStorage.getItem('staffSid'), //sid staffSid: window.sessionStorage.getItem('staffSid'), //sid
type: '', // 123 type: '', // 123
}, // }, //
quantity: '', //
// //
customerList: {}, customerList: {},
// //
@ -1218,6 +1228,7 @@ export default {
staffSid: window.sessionStorage.getItem('staffSid'), //sid staffSid: window.sessionStorage.getItem('staffSid'), //sid
type: '', // 123 type: '', // 123
} }
}, },
showAdd() { showAdd() {
this.relState = '1' this.relState = '1'
@ -1292,32 +1303,43 @@ export default {
if (taishu.length > 0) { if (taishu.length > 0) {
this.temp.busSalesOrderPrice.quantity = taishu.reduce(this.getSum); this.temp.busSalesOrderPrice.quantity = taishu.reduce(this.getSum);
} else { } else {
return 0 this.temp.busSalesOrderPrice.quantity = 0
return this.temp.busSalesOrderPrice.quantity
} }
}, },
// //
NumberMulFour() { NumberMulFour() {
console.log('tai shu',111111)
// //
if (this.temp.busSalesOrderPrice.singleFinalPrice == '') { if (this.temp.busSalesOrderPrice.singleFinalPrice == '') {
return 0 return 0
} }
// //
if (this.temp.busSalesOrderPrice.quantity == '') { if (this.temp.busSalesOrderPrice.quantity == '' && this.quantity == '') {
return 0 return 0
} }
console.log('tai shu',222222)
var singleFinalPrice = 0 var singleFinalPrice = 0
var quantity = 0 var quantity = 0
singleFinalPrice = parseFloat(this.temp.busSalesOrderPrice.singleFinalPrice) singleFinalPrice = parseFloat(this.temp.busSalesOrderPrice.singleFinalPrice)
quantity = parseFloat(this.temp.busSalesOrderPrice.quantity) if (this.isXuanzeShow == '3') {
console.log('11111',this.temp.busSalesOrderPrice.singleFinalPrice,singleFinalPrice,quantity) quantity = parseFloat(this.quantity)
console.log('11111.22',this.temp.busSalesOrderPrice.singleFinalPrice,singleFinalPrice,quantity) } else {
quantity = parseFloat(this.temp.busSalesOrderPrice.quantity)
}
console.log('tai shu', quantity)
console.log('11111', this.temp.busSalesOrderPrice.singleFinalPrice, singleFinalPrice, quantity)
console.log('11111.22', this.temp.busSalesOrderPrice.singleFinalPrice, singleFinalPrice, quantity)
const chejia1 = singleFinalPrice.toString() const chejia1 = singleFinalPrice.toString()
const chejia2 = quantity.toString() const chejia2 = quantity.toString()
console.log('22222',chejia1,chejia2) console.log('22222', chejia1, chejia2)
const value = Number(chejia1.replace(',', '')) * Number(chejia2.replace(',', '')) const value = Number(chejia1.replace(',', '')) * Number(chejia2.replace(',', ''))
this.temp.busSalesOrderPrice.priceSum = value.toString() this.temp.busSalesOrderPrice.priceSum = value.toString()
console.log('33333',value) console.log('33333', value)
if (this.temp.busSalesOrderPrice.priceSum == 0) {
this.temp.busSalesOrderPrice.priceSum = 0
return this.temp.busSalesOrderPrice.priceSum
}
return this.temp.busSalesOrderPrice.priceSum return this.temp.busSalesOrderPrice.priceSum
}, },
// //
@ -1338,6 +1360,10 @@ export default {
const s2 = quantity.toString() const s2 = quantity.toString()
const value = Number(s1.replace(',', '')) * Number(s2.replace(',', '')) const value = Number(s1.replace(',', '')) * Number(s2.replace(',', ''))
this.temp.busSalesOrderDeposit.depositAll = value.toString() this.temp.busSalesOrderDeposit.depositAll = value.toString()
if (this.temp.busSalesOrderDeposit.depositAl == '') {
this.temp.busSalesOrderDeposit.depositAl = 0
return this.temp.busSalesOrderDeposit.depositAl
}
return this.temp.busSalesOrderDeposit.depositAll return this.temp.busSalesOrderDeposit.depositAll
}, },
// //
@ -1379,16 +1405,26 @@ export default {
} else { } else {
this.temp.isTop = '0' this.temp.isTop = '0'
} }
if (this.checkedBaoxian) {
this.temp.isInsurance = '1'
} else {
this.temp.isInsurance = '0'
}
if (this.temp.busSalesOrderDeposit.depositTypeKey == '01') { if (this.temp.busSalesOrderDeposit.depositTypeKey == '01') {
this.temp.busSalesOrderDeposit.depositType = '现交订金' this.temp.busSalesOrderDeposit.depositType = '现交订金'
} else { } else {
this.temp.busSalesOrderDeposit.depositType = '订金结转' this.temp.busSalesOrderDeposit.depositType = '订金结转'
} }
if (this.isXuanzeShow == '3') {
this.busSalesOrderPrice.quantity = Number(this.quantity)
} else {
this.busSalesOrderPrice.quantity = Number(this.busSalesOrderPrice.quantity)
}
console.log('type', this.isXuanzeShow) console.log('type', this.isXuanzeShow)
this.temp.type = this.isXuanzeShow this.temp.type = this.isXuanzeShow
const priceList = [] const priceList = []
this.temp.busSalesOrderDiscountList.forEach((element) => { this.temp.busSalesOrderDiscountList.forEach((element) => {
priceList.push(element.totalValue) priceList.push(toString(element.totalValue))
}) })
this.temp.priceList = priceList this.temp.priceList = priceList
console.log(this.temp) console.log(this.temp)
@ -1623,11 +1659,14 @@ export default {
// //
openZhuche() { openZhuche() {
this.relState = '4.1' this.relState = '4.1'
this.$refs['zhucheyouhui'].showZhuche(this.temp.busSalesOrderDiscountList) this.$refs['zhucheyouhui'].showZhuche(this.temp.busSalesOrderDiscountList)
}, },
// //
openXunidingdanList() { openXunidingdanList(index) {
console.log('虚拟订单', index)
this.relState = '5.1' this.relState = '5.1'
this.$refs['xuniList'].showXuni(this.temp.customerSid, index)
}, },
// //
handleSubmit() { handleSubmit() {
@ -1640,7 +1679,6 @@ export default {
message: '请选择一个客户!', message: '请选择一个客户!',
type: 'error' type: 'error'
}); });
} }
}, },
// ---------------- ---------------- // ---------------- ----------------
@ -1882,14 +1920,17 @@ export default {
}) })
}, },
// //
selectXuniList(row) { selectXuniList(row, index) {
console.log('所选虚拟顶金', row) console.log('所选虚拟顶金', row)
row.forEach((element) => { row.forEach((element) => {
this.temp.busDepositFictitiousList.push({ this.temp.busDepositFictitiousList[index].depositBillNo = element.billNo
depositBillNo: element.billNo, // this.temp.busDepositFictitiousList[index].depositPrice = element.deposit - element.usedDeposit
depositPrice: element.deposit - element.usedDeposit, // this.temp.busDepositFictitiousList[index].depositSid = element.sid
depositSid: element.sid, //sid // this.temp.busDepositFictitiousList.push({
}) // depositBillNo: element.billNo, //
// depositPrice: element.deposit - element.usedDeposit, //
// depositSid: element.sid, //sid
// })
}) })
}, },
// //
@ -1898,12 +1939,12 @@ export default {
}, },
// ------------------------------------------------------ // ------------------------------------------------------
// //
deleteZhuche() { deleteZhuche(row, index) {
this.temp.busSalesOrderDiscountList.splice(index, 1)
}, },
// //
deleteXuni() { deleteXuni(row, index) {
this.temp.busDepositFictitiousList.splice(index, 1)
}, },
// //
delXianche(index) { delXianche(index) {
@ -1923,7 +1964,13 @@ export default {
// }) // })
// }, // },
addXunidingjin() { addXunidingjin() {
this.temp.busDepositFictitiousList.push({
depositBillNo: '', //
depositPrice: '', //
depositSid: '', //sid
payPath: '', //
price: '', //
})
}, },
// 使 // 使
@ -2099,4 +2146,9 @@ export default {
.dialogBtn { .dialogBtn {
text-align: left; text-align: left;
} }
.linkNoSty {
display: inline-block;
padding-right: 20px;
}
</style> </style>

4
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue

@ -52,7 +52,7 @@
</el-col> </el-col>
<el-col :span="8" class="trightb"> <el-col :span="8" class="trightb">
<el-form-item> <el-form-item>
<el-input v-model="temp.discountName" class="addinputw" placeholder="" <el-input v-model="temp.projectName" class="addinputw" placeholder=""
clearable/> clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -273,7 +273,7 @@
} }
}) })
this.temp.discountType = bb.name this.temp.discountType = bb.name
this.temp.discountTypeKey = bb.name this.temp.discountTypeKey = bb.key
console.log('name', this.temp.discountType) console.log('name', this.temp.discountType)
}, },
// ------------ ------------ // ------------ ------------

Loading…
Cancel
Save