123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 |
- <template>
- <div class="aacontainer">
- <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
- <el-tab-pane label="全部订单" name="10"></el-tab-pane>
- <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
- </el-tabs>
- <el-table v-loading="loading" :data="orderList" >
- <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
- <el-table-column label="所属公司" align="center" prop="companyName" />
- <el-table-column label="员工" align="center" prop="companyUserName" />
- <el-table-column label="就诊人" align="center" prop="patientName" />
- <el-table-column label="应收金额" align="center" prop="payPrice" />
- <el-table-column label="实收金额" align="center" prop="payMoney" />
- <el-table-column label="支付方式" align="center" prop="payType" >
- <template slot-scope="scope">
- <dict-tag :options="PayOptions" :value="scope.row.payType"/>
- </template>
- </el-table-column>
-
- <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
- <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
- <el-table-column label="订单状态" align="center" prop="status" >
- <template slot-scope="scope">
- <dict-tag :options="orderOptions" :value="scope.row.status"/>
- </template>
- </el-table-column>
- <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
- <template slot-scope="scope">
- <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
- </template>
- </el-table-column>
- <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
- <template slot-scope="scope">
- <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- </template>
- <script>
- import { userOrderList, getOrder, delOrder, addOrder, updateOrder, exportOrder,importTemplate } from "@/api/store/storeOrder";
- import { getToken } from "@/utils/auth";
- export default {
- name: "userInquir",
- props:["data"],
- data() {
- return {
- actName:"10",
- show:{
- title:"订单详情",
- open:false,
- },
- upload: {
- // 是否显示弹出层
- open: false,
- // 弹出层标题
- title: "",
- // 是否禁用上传
- isUploading: false,
- // 是否更新已经存在的用户数据
- updateSupport: 0,
- // 设置上传的请求头部
- headers: { Authorization: "Bearer " + getToken() },
- // 上传的地址
- url: process.env.VUE_APP_BASE_API + "/his/order/importData"
- },
- // 遮罩层
- loading: true,
- // 导出遮罩层
- exportLoading: false,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 订单表格数据
- orderList: [],
- // 弹出层标题
- title: "",
- createTime:null,
- payTime:null,
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- storeId: null,
- orderCode: null,
- userId: null,
- userName: null,
- userPhone: null,
- userAddress: null,
- cartId: null,
- totalNum: null,
- totalPrice: null,
- payPrice: null,
- payMoney: null,
- isPay: null,
- payTime: null,
- payType: null,
- status: null,
- refundStatus: null,
- refundImg: null,
- refundExplain: null,
- refundTime: null,
- refundReason: null,
- refundMoney: null,
- deliveryCode: null,
- deliveryName: null,
- deliverySn: null,
- isDel: null,
- costPrice: null,
- verifyCode: null,
- shippingType: null,
- isChannel: null,
- isPrescribe: null,
- prescribeId: null,
- finishTime: null,
- patientName: null,
- doctorName: null,
- sTime:null,
- eTime:null,
- paysTime:null,
- payeTime:null,
- deliveryTime: null,
- tuiMoney: null,
- tuiMoneyStatus: null,
- tuiUserId: null,
- orderCreateType: null
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- },
- PayOptions:[],
- orderOptions:[],
- payStatusOptions:[],
- refundOptions:[],
- channelOptions:[],
- orderTypeOptions:[],
- deliveryStatusOptions:[],
- deliveryPayStatusOptions:[],
- deliveryTypeOptions:[],
- tuiOptions:[],
- orOptions:[],
- storeOPtions:[],
- };
- },
- created() {
- this.getDicts("sys_inquiry_pay").then(response => {
- this.PayOptions = response.data;
- });
- this.getDicts("store_order_type").then(response => {
- this.orderTypeOptions = response.data;
- });
- this.getDicts("sys_order_status").then(response => {
- this.orderOptions = response.data;
- });
- this.getDicts("sys_order_pay").then(response => {
- this.payStatusOptions = response.data;
- });
- this.getDicts("sys_refund_status").then(response => {
- this.refundOptions = response.data;
- });
- this.getDicts("sys_channel").then(response => {
- this.channelOptions = response.data;
- });
- this.getDicts("sys_tui_money_status").then(response => {
- this.tuiOptions = response.data;
- });
- this.getDicts("sys_company_or").then(response => {
- this.orOptions = response.data;
- });
- this.getDicts("sys_store_delivery_pay_status").then(response => {
- this.deliveryPayStatusOptions = response.data;
- });
- this.getDicts("sys_store_order_delivery_status").then(response => {
- this.deliveryStatusOptions = response.data;
- });
- this.getDicts("sys_delivery_type").then(response => {
- this.deliveryTypeOptions = response.data;
- });
- },
- methods: {
- getUserDetails(id){
- this.queryParams.userId=id
- this.getList();
- },
- /** 查询订单列表 */
- getList() {
- this.loading = true;
- userOrderList(this.queryParams).then(response => {
- this.orderList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- orderId: null,
- storeId: null,
- orderCode: null,
- userId: null,
- userName: null,
- userPhone: null,
- userAddress: null,
- cartId: null,
- totalNum: null,
- totalPrice: null,
- payPrice: null,
- payMoney: null,
- isPay: null,
- payTime: null,
- payType: null,
- createTime: null,
- updateTime: null,
- status: null,
- refundStatus: "0",
- refundImg: null,
- refundExplain: null,
- refundTime: null,
- refundReason: null,
- refundMoney: null,
- deliveryCode: null,
- deliveryName: null,
- deliverySn: null,
- remark: null,
- isDel: null,
- costPrice: null,
- verifyCode: null,
- shippingType: null,
- isChannel: null,
- isPrescribe: null,
- prescribeId: null,
- finishTime: null,
- deliveryTime: null,
- tuiMoney: null,
- tuiMoneyStatus: 0,
- tuiUserId: null,
- orderCreateType: null
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- handleClickX(tab, event) {
- if(tab.name=="10"){
- this.queryParams.status=null;
- }else{
- this.queryParams.status=tab.name;
- }
- this.handleQuery();
- },
- changeTime(){
- if(this.createTime!=null){
- this.queryParams.sTime=this.createTime[0];
- this.queryParams.eTime=this.createTime[1];
- }else{
- this.queryParams.sTime=null;
- this.queryParams.eTime=null;
- }
- },
- changePayTime(){
- if(this.payTime!=null){
- this.queryParams.sTime=this.payTime[0];
- this.queryParams.eTime=this.payTime[1];
- }else{
- this.queryParams.paysTime=null;
- this.queryParams.payeTime=null;
- }
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.createTime=null;
- this.queryParams.sTime=null;
- this.queryParams.eTime=null;
- this.payTime=null;
- this.queryParams.paysTime=null;
- this.queryParams.payeTime=null;
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.orderId)
- this.single = selection.length!==1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加订单";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const orderId = row.orderId || this.ids
- getOrder(orderId).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "修改订单";
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.orderId != null) {
- updateOrder(this.form).then(response => {
- this.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addOrder(this.form).then(response => {
- this.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const orderIds = row.orderId || this.ids;
- this.$confirm('是否确认删除订单编号为"' + orderIds + '"的数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return delOrder(orderIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- }).catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$confirm('是否确认导出所有订单数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportOrder(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- }).catch(() => {});
- }
- }
- };
- </script>
|