|
@@ -8,18 +8,9 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="订单日期">
|
|
<el-form-item label="订单日期">
|
|
- <el-date-picker
|
|
|
|
- v-model="advancedForm.goodsExchange_time_range"
|
|
|
|
- type="daterange"
|
|
|
|
- align="center"
|
|
|
|
- :editable="false"
|
|
|
|
- unlink-panels
|
|
|
|
- :clearable="false"
|
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
|
- range-separator="-"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- value-format="timestamp"
|
|
|
|
|
|
+ <el-date-picker v-model="advancedForm.goodsExchange_time_range" type="daterange" align="center"
|
|
|
|
+ :editable="false" unlink-panels :clearable="false" :default-time="['00:00:00', '23:59:59']"
|
|
|
|
+ range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="timestamp"
|
|
:picker-options="{
|
|
:picker-options="{
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
return (
|
|
return (
|
|
@@ -29,56 +20,36 @@
|
|
new Date().getMonth(),
|
|
new Date().getMonth(),
|
|
new Date().getDate()
|
|
new Date().getDate()
|
|
).getTime() +
|
|
).getTime() +
|
|
- 86400000 -
|
|
|
|
- 1
|
|
|
|
|
|
+ 86400000 -
|
|
|
|
+ 1
|
|
);
|
|
);
|
|
},
|
|
},
|
|
shortcuts: MixinPickerShortcuts,
|
|
shortcuts: MixinPickerShortcuts,
|
|
- }"
|
|
|
|
- >
|
|
|
|
|
|
+ }">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="仓库">
|
|
<el-form-item label="仓库">
|
|
<el-select v-model="advancedForm.warehouse_id" clearable>
|
|
<el-select v-model="advancedForm.warehouse_id" clearable>
|
|
- <el-option
|
|
|
|
- v-for="item in warehouseList"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-option v-for="item in warehouseList" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="订单编号">
|
|
<el-form-item label="订单编号">
|
|
- <el-input
|
|
|
|
- v-model="advancedForm.sn"
|
|
|
|
- placeholder="请输入订单编号"
|
|
|
|
- ></el-input>
|
|
|
|
|
|
+ <el-input v-model="advancedForm.sn" placeholder="请输入订单编号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
<el-button @click="advancedSearchEvent"> 搜索 </el-button>
|
|
<el-button @click="advancedSearchEvent"> 搜索 </el-button>
|
|
</div>
|
|
</div>
|
|
- <en-table-layout
|
|
|
|
- toolbar
|
|
|
|
- pagination
|
|
|
|
- :loading="loading"
|
|
|
|
- :tableData="tableData"
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
- >
|
|
|
|
|
|
+ <en-table-layout toolbar pagination :loading="loading" :tableData="tableData"
|
|
|
|
+ @selection-change="handleSelectionChange">
|
|
<div slot="toolbar" class="inner-toolbar">
|
|
<div slot="toolbar" class="inner-toolbar">
|
|
<div class="toolbar-btns">
|
|
<div class="toolbar-btns">
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- v-if="checkPermission(['order:add'])"
|
|
|
|
- @click="handleAdd"
|
|
|
|
- >新增</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button size="mini" type="primary" v-if="checkPermission(['order:add'])" @click="handleAdd">新增</el-button>
|
|
<!-- <el-button size="mini" type="primary" v-if="checkPermission(['order:outbound'])"
|
|
<!-- <el-button size="mini" type="primary" v-if="checkPermission(['order:outbound'])"
|
|
@click="batchOutbound">批量出库</el-button> -->
|
|
@click="batchOutbound">批量出库</el-button> -->
|
|
</div>
|
|
</div>
|
|
@@ -128,8 +99,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>:selectable="canWarehouseOut"
|
|
</el-form>:selectable="canWarehouseOut"
|
|
</template>
|
|
</template>
|
|
- </en-table-search>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+</en-table-search>
|
|
|
|
+</div> -->
|
|
</div>
|
|
</div>
|
|
<template slot="table-columns">
|
|
<template slot="table-columns">
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
@@ -179,47 +150,36 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="status" label="订单类型">
|
|
<el-table-column prop="status" label="订单类型">
|
|
- <template slot-scope="scope">{{ scope.row.type=='TO_B'?'销售订单':'租赁订单' }}</template>
|
|
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.type == 'TO_B' ? '销售订单' : '租赁订单' }}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="status" label="支付状态">
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.has_pay_return ? '已支付' : '未支付' }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="300">
|
|
<el-table-column label="操作" width="300">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button size="mini" @click="handleAudit(scope.row)"
|
|
|
|
- >查看</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="success"
|
|
|
|
- v-if="scope.row.status === 'TO_BE_COMMIT'"
|
|
|
|
- @click="handleSubmit(scope.row.id)"
|
|
|
|
- >确认</el-button
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- @click="handleEdit(scope.row)"
|
|
|
|
- v-if="scope.row.status === 'TO_BE_COMMIT'"
|
|
|
|
- >编辑</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button size="mini" @click="handleAudit(scope.row)">查看</el-button>
|
|
|
|
+ <el-button size="mini" type="success" v-if="scope.row.status === 'TO_BE_COMMIT'"
|
|
|
|
+ @click="handleSubmit(scope.row.id)">确认</el-button>
|
|
|
|
+ <el-button size="mini" @click="handleEdit(scope.row)"
|
|
|
|
+ v-if="scope.row.status === 'TO_BE_COMMIT'">编辑</el-button>
|
|
<el-button size="mini" type="danger" v-if="scope.row.type === 'TO_C'"
|
|
<el-button size="mini" type="danger" v-if="scope.row.type === 'TO_C'"
|
|
- @click="handleWithdraw(scope.row.id)">延期</el-button>
|
|
|
|
|
|
+ @click="handleWithdraw(scope.row.id)">延期</el-button>
|
|
|
|
+ <el-button size="mini" type="danger" v-if="!scope.row.has_pay_return"
|
|
|
|
+ @click="payTypes(scope.row)">支付</el-button>
|
|
<!-- <el-button size="mini" type="primary" v-if="scope.row.allowable.payment && checkPermission(['order:payment'])"
|
|
<!-- <el-button size="mini" type="primary" v-if="scope.row.allowable.payment && checkPermission(['order:payment'])"
|
|
@click="handlePayment(scope.row.id)">设为已支付</el-button> -->
|
|
@click="handlePayment(scope.row.id)">设为已支付</el-button> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
- <el-pagination
|
|
|
|
- slot="pagination"
|
|
|
|
- v-if="pageData"
|
|
|
|
- @size-change="handlePageSizeChange"
|
|
|
|
- @current-change="handlePageCurrentChange"
|
|
|
|
- :current-page="pageData.page_no"
|
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
|
- :page-size="pageData.page_size"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="pageData.data_total"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-pagination slot="pagination" v-if="pageData" @size-change="handlePageSizeChange"
|
|
|
|
+ @current-change="handlePageCurrentChange" :current-page="pageData.page_no" :page-sizes="[10, 20, 50, 100]"
|
|
|
|
+ :page-size="pageData.page_size" layout="total, sizes, prev, pager, next, jumper" :total="pageData.data_total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</en-table-layout>
|
|
</en-table-layout>
|
|
|
|
+ <el-dialog title="扫码支付" :visible.sync="payVisible" width="30%" :close-on-click-modal="false" @close="closeDialog">
|
|
|
|
+ <div id="qrCode" style=" display: flex;
|
|
|
|
+ justify-content: center;" ref="qrCodeDiv"></div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -229,6 +189,7 @@ import Storage from "@/utils/storage";
|
|
import * as API_BasicSetting from "@/api/basicSetting";
|
|
import * as API_BasicSetting from "@/api/basicSetting";
|
|
import * as API_Setting from "@/api/setting";
|
|
import * as API_Setting from "@/api/setting";
|
|
import * as API_CollectingAccount from "@/api/collectingAccount";
|
|
import * as API_CollectingAccount from "@/api/collectingAccount";
|
|
|
|
+import QRCode from 'qrcodejs2'
|
|
export default {
|
|
export default {
|
|
name: "orderList",
|
|
name: "orderList",
|
|
data() {
|
|
data() {
|
|
@@ -264,6 +225,12 @@ export default {
|
|
deliveryTypeList: [
|
|
deliveryTypeList: [
|
|
],
|
|
],
|
|
customerList: [],
|
|
customerList: [],
|
|
|
|
+ payVisible: false,
|
|
|
|
+ payCode: '',
|
|
|
|
+ //当前地址
|
|
|
|
+ payurl: "",
|
|
|
|
+ paySn: '',
|
|
|
|
+ pay_price: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -291,6 +258,35 @@ export default {
|
|
next();
|
|
next();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ closeDialog() {
|
|
|
|
+ this.payVisible = false
|
|
|
|
+ this.payCode = ''
|
|
|
|
+ this.paySn = ""
|
|
|
|
+ this.pay_price = ''
|
|
|
|
+ },
|
|
|
|
+ /* 支付 */
|
|
|
|
+ payTypes(val) {
|
|
|
|
+ this.payurl = window.location.href.split('#')[0]
|
|
|
|
+ this.payVisible = true
|
|
|
|
+ this.payCode = val.id
|
|
|
|
+ this.paySn = val.sn
|
|
|
|
+ this.pay_price = val.pay_price
|
|
|
|
+ this.creatQrCode()
|
|
|
|
+ },
|
|
|
|
+ // 二维码生成
|
|
|
|
+ creatQrCode() {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.qrCodeDiv.innerHTML = "";
|
|
|
|
+ new QRCode(this.$refs.qrCodeDiv, {
|
|
|
|
+ text: this.payurl + '#/payType?id=' + this.payCode + '&sn=' + this.paySn + '&price=' + this.pay_price,
|
|
|
|
+ width: 200,
|
|
|
|
+ height: 200,
|
|
|
|
+ colorDark: "#333333", //二维码颜色
|
|
|
|
+ colorLight: "#ffffff", //二维码背景色
|
|
|
|
+ correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
|
|
|
|
+ })
|
|
|
|
+ }, 500);
|
|
|
|
+ },
|
|
memberType(val) {
|
|
memberType(val) {
|
|
let name = "";
|
|
let name = "";
|
|
this.customerList.map((el) => {
|
|
this.customerList.map((el) => {
|
|
@@ -306,7 +302,7 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.customerList = response.data;
|
|
this.customerList = response.data;
|
|
})
|
|
})
|
|
- .catch(() => {});
|
|
|
|
|
|
+ .catch(() => { });
|
|
},
|
|
},
|
|
//配送方式查看
|
|
//配送方式查看
|
|
deliveryType(val) {
|
|
deliveryType(val) {
|
|
@@ -457,7 +453,7 @@ export default {
|
|
handleAudit(order) {
|
|
handleAudit(order) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: "orderDetail",
|
|
name: "orderDetail",
|
|
- params: { id: order.id, callback: this.GET_OrderList,type:'check' },
|
|
|
|
|
|
+ params: { id: order.id, callback: this.GET_OrderList, type: 'check' },
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 订单设为已支付 */
|
|
/** 订单设为已支付 */
|
|
@@ -482,7 +478,7 @@ export default {
|
|
async handleWithdraw(id) {
|
|
async handleWithdraw(id) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: "orderEdit",
|
|
name: "orderEdit",
|
|
- params: { id: id,type:'pone' },
|
|
|
|
|
|
+ params: { id: id, type: 'pone' },
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -496,7 +492,7 @@ export default {
|
|
page_size: response.page_size,
|
|
page_size: response.page_size,
|
|
data_total: response.data_total,
|
|
data_total: response.data_total,
|
|
};
|
|
};
|
|
- }).catch(() => {
|
|
|
|
|
|
+ }).catch(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -511,16 +507,19 @@ export default {
|
|
padding: 30px 20px 5px;
|
|
padding: 30px 20px 5px;
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
+
|
|
.el-button {
|
|
.el-button {
|
|
width: 100px;
|
|
width: 100px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.search {
|
|
.search {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
background: #fff;
|
|
background: #fff;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
padding: 30px 10px 10px 10px;
|
|
padding: 30px 10px 10px 10px;
|
|
|
|
+
|
|
/deep/ .el-form-item {
|
|
/deep/ .el-form-item {
|
|
.el-form-item__content {
|
|
.el-form-item__content {
|
|
.el-input {
|
|
.el-input {
|
|
@@ -528,11 +527,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-button {
|
|
.el-button {
|
|
margin-top: -19px;
|
|
margin-top: -19px;
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
/* .container {
|
|
/* .container {
|
|
padding: 10px 10px 0 10px;
|
|
padding: 10px 10px 0 10px;
|
|
} */
|
|
} */
|
|
@@ -699,7 +700,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
/*分页信息*/
|
|
/*分页信息*/
|
|
-section > div {
|
|
|
|
|
|
+section>div {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -717,5 +718,9 @@ section > div {
|
|
color: red;
|
|
color: red;
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
|
|
|
|
+.el-dialog__body {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+}
|
|
|
|
+</style>
|