|
|
@@ -59,6 +59,28 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-form-item label="" prop="orderStateCharge">
|
|
|
+ <el-select v-model="searchForm.orderStateCharge" :size="sizeType" @change="combinedQueryBtn" filterable placeholder="收款状态" value-key="id">
|
|
|
+ <el-option
|
|
|
+ label="收款状态(全部)"
|
|
|
+ value="-1">
|
|
|
+ </el-option>
|
|
|
+ <el-option
|
|
|
+ label="未收款"
|
|
|
+ value="0">
|
|
|
+ </el-option>
|
|
|
+ <el-option
|
|
|
+ label="部分收款"
|
|
|
+ value="2">
|
|
|
+ </el-option>
|
|
|
+ <el-option
|
|
|
+ label="完成收款"
|
|
|
+ value="3">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-button
|
|
|
style="margin-bottom: 10px;margin-right: 10px"
|
|
|
@@ -80,6 +102,9 @@
|
|
|
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
|
|
<el-button size="mini" circle icon="el-icon-refresh" @click="getList"/>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="导出" placement="top">
|
|
|
+ <el-button size="mini" circle icon="el-icon-download" @click="exportList"/>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
@@ -99,6 +124,24 @@
|
|
|
:width="permissionFlag2?'180px':'160px'"
|
|
|
class-name="small-padding fixed-width">
|
|
|
<template slot-scope="{row}">
|
|
|
+ <el-button
|
|
|
+ v-show ="row.chargeMoney != 0"
|
|
|
+ :title="row.chargeMoney < 0 ? '订单收款(多收)': '订单收款(有欠款)'"
|
|
|
+ :class="row.chargeMoney < 0 ? 'buttonPurple': 'buttonRed'"
|
|
|
+ @click="orderPay(row)"
|
|
|
+ type="green"
|
|
|
+ icon="el-icon-money"
|
|
|
+ size="mini">
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-show="row.chargeMoney == 0"
|
|
|
+ :title="'全款已收'"
|
|
|
+ :class="'buttonGreen'"
|
|
|
+ @click="orderPay(row)"
|
|
|
+ type="green"
|
|
|
+ icon="el-icon-money"
|
|
|
+ size="mini">
|
|
|
+ </el-button>
|
|
|
<el-dropdown
|
|
|
v-if="row.orderState == 0 || row.orderState == 1"
|
|
|
size="mini"
|
|
|
@@ -273,6 +316,53 @@
|
|
|
width="1200px">
|
|
|
<order-detail ref="orderDetail"></order-detail>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="订单收款"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ class="orderPayDialog"
|
|
|
+ :visible.sync='orderPayVisible'
|
|
|
+ width="800px">
|
|
|
+ <el-card>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>订单编号:</label>
|
|
|
+ <span>{{ orderPayInfo.orderInfo.orderCode }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>印品名称:</label>
|
|
|
+ <span>{{ orderPayInfo.orderInfo.orderName }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>客户名称:</label>
|
|
|
+ <span>{{ orderPayInfo.orderInfo.clientName }}</span>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <el-card>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>总金额:</label>
|
|
|
+ <span>{{ orderPayInfo.orderInfo.printMoneyTotal }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>已收金额:</label>
|
|
|
+ <span>{{ orderPayInfo.orderInfo.payMoney }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="infoItem">
|
|
|
+ <label>应收金额:</label>
|
|
|
+ <span style="color:red">{{ orderPayInfo.orderInfo.chargeMoney }}</span>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <el-card>
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item label="本次收款金额">
|
|
|
+ <el-input type="number" v-model="orderPayInfo.receivableMoney"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="orderPayVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="orderPaySure" :disabled="orderPayLoading">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -280,12 +370,17 @@
|
|
|
import {
|
|
|
clientPayRequest,
|
|
|
getOrderList,
|
|
|
+ exportOrderList,
|
|
|
ifPermission,
|
|
|
- voidPrintOrder
|
|
|
+ voidPrintOrder,
|
|
|
+ payPrintOrder
|
|
|
} from '@/api/order/orderList.js'
|
|
|
import {
|
|
|
backPrintOrder
|
|
|
} from '@/api/order/tobeReviewed'
|
|
|
+import {
|
|
|
+ getPrintOrderInfo
|
|
|
+} from '@/api/order/orderDetail.js'
|
|
|
import Cancledialog from '@/components/Dialog/Cancledialog.vue'
|
|
|
import productInfo from '@/views/productFile/product/productInfo'
|
|
|
import clientInfo from '@/views/doc/client/clientList'
|
|
|
@@ -302,6 +397,7 @@ import new_badge from '@/assets/new_badge.gif';
|
|
|
|
|
|
const searchForm = {
|
|
|
orderState: '-1',
|
|
|
+ orderStateCharge: '-1',
|
|
|
orderCode: '',
|
|
|
printBillCode: '',
|
|
|
clientCode: '',
|
|
|
@@ -677,6 +773,35 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ exportList() {
|
|
|
+ const _that = this
|
|
|
+ if (_that.searchTime == null || _that.searchTime < 0) {
|
|
|
+ _that.searchForm.beginTime = ''
|
|
|
+ _that.searchForm.endTime = ''
|
|
|
+ } else {
|
|
|
+ _that.searchForm.beginTime = _that.searchTime[0]
|
|
|
+ _that.searchForm.endTime = _that.searchTime[1]
|
|
|
+ }
|
|
|
+ var params
|
|
|
+ if (_that.queryType == 1) {
|
|
|
+ params = _that.search
|
|
|
+ } else {
|
|
|
+ params = _that.searchForm
|
|
|
+ }
|
|
|
+ var orderBy = _that.orderByString
|
|
|
+ var data = {
|
|
|
+ 'params': JSON.stringify(params),
|
|
|
+ 'orderBy': orderBy
|
|
|
+ }
|
|
|
+ // console.log(data)
|
|
|
+ // return;
|
|
|
+ exportOrderList(data).then(response => {
|
|
|
+ _that.$message.success('导出成功,请稍候前至系统管理-我的任务中进行查看和下载')
|
|
|
+ }).catch(err => {
|
|
|
+ _that.$message.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取脚印
|
|
|
getOrderStep(row) {
|
|
|
const _that = this
|
|
|
@@ -914,6 +1039,63 @@ export default {
|
|
|
var url = '/order/v1/forceCompleteOrder'
|
|
|
_that.$refs.confirmDialog.updataClick(params, url)
|
|
|
},
|
|
|
+
|
|
|
+ orderPay(row) {
|
|
|
+ const _that = this
|
|
|
+ _that.orderPayVisible = true
|
|
|
+ // _that.orderPayInfo.orderInfo = row
|
|
|
+ var data = {
|
|
|
+ idOrder: row.id
|
|
|
+ }
|
|
|
+ getPrintOrderInfo(data).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ _that.orderPayInfo.orderInfo = res.data
|
|
|
+ _that.orderPayInfo.receivableMoney = ''
|
|
|
+ })
|
|
|
+ // getOrderReceivableByOrder(data).then(res => {
|
|
|
+ // // console.log(res)
|
|
|
+ // _that.orderPayInfo.orderReceivableList = res.data
|
|
|
+ // _that.orderPayInfo.receivableMoney = ''
|
|
|
+ // })
|
|
|
+
|
|
|
+ },
|
|
|
+ // 收款确认
|
|
|
+ orderPaySure() {
|
|
|
+ const _that = this
|
|
|
+
|
|
|
+ if (_that.orderPayInfo.receivableMoney == '' || _that.orderPayInfo.receivableMoney == undefined || _that.orderPayInfo.receivableMoney == null) {
|
|
|
+ _that.$message.warning('请填写收款金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ _that.orderPayLoading = true
|
|
|
+ var order = {
|
|
|
+ 'id': _that.orderPayInfo.orderInfo.id,
|
|
|
+ 'payMoney': _that.orderPayInfo.receivableMoney
|
|
|
+ }
|
|
|
+ var data = JSON.stringify(order)
|
|
|
+ payPrintOrder(data).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // res.data.qrCodeImageUrl
|
|
|
+ const h = this.$createElement;
|
|
|
+ if (res.httpCode == 200) {
|
|
|
+ _that.orderPayVisible = false
|
|
|
+ _that.orderPayLoading = false
|
|
|
+ this.tableRefresh();
|
|
|
+ _that.$notify({
|
|
|
+ title: '提示',
|
|
|
+ type: 'success',
|
|
|
+ message: h('i', { style: 'color: teal'},'收款成功'),
|
|
|
+ duration: 30000,
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ _that.orderPayLoading = false
|
|
|
+ // _that.$message.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 批量下单
|
|
|
delphiWin() {
|
|
|
// alert('delphi弹窗')
|