payRemainList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="公司名" prop="companyId">
  5. <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
  6. <el-option
  7. v-for="item in companys"
  8. :key="item.companyId"
  9. :label="item.companyName"
  10. :value="item.companyId"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="订单号" prop="orderCode">
  15. <el-input
  16. v-model="queryParams.orderCode"
  17. placeholder="请输入订单号"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item label="运单号" prop="deliveryId">
  24. <el-input
  25. v-model="queryParams.deliveryId"
  26. placeholder="请输入运单号"
  27. clearable
  28. size="small"
  29. @keyup.enter.native="handleQuery"
  30. />
  31. </el-form-item>
  32. <el-form-item label="手机号" prop="userPhone">
  33. <el-input
  34. v-model="queryParams.userPhone"
  35. placeholder="请输入会员手机号"
  36. clearable
  37. size="small"
  38. @keyup.enter.native="handleQuery"
  39. />
  40. </el-form-item>
  41. <el-form-item label="员工姓名" prop="companyUserNickName">
  42. <el-input
  43. v-model="queryParams.companyUserNickName"
  44. placeholder="请输入员工姓名"
  45. clearable
  46. size="small"
  47. @keyup.enter.native="handleQuery"
  48. />
  49. </el-form-item>
  50. <el-form-item label="下单时间" prop="createTimeRange">
  51. <el-date-picker
  52. style="width:205.4px"
  53. clearable size="small"
  54. v-model="createTimeRange"
  55. type="daterange"
  56. value-format="yyyy-MM-dd"
  57. start-placeholder="开始日期"
  58. end-placeholder="结束日期">
  59. </el-date-picker>
  60. </el-form-item>
  61. <el-form-item>
  62. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  63. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  64. </el-form-item>
  65. </el-form>
  66. <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
  67. <el-tab-pane label="已付款待审核" name="1"></el-tab-pane>
  68. <el-tab-pane label="已审核" name="2"></el-tab-pane>
  69. </el-tabs>
  70. <el-table height="500" border v-loading="loading" :data="storeOrderList" @selection-change="handleSelectionChange">
  71. <el-table-column type="selection" width="55" align="center" />
  72. <el-table-column label="订单号" align="center" prop="orderCode" width="200px" />
  73. <el-table-column label="所属公司" align="center" prop="companyName" />
  74. <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
  75. <el-table-column label="用户昵称" align="center" prop="nickname" width="150px" >
  76. <template slot-scope="scope">
  77. <span>{{scope.row.nickname}} </span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="收件人" align="center" prop="realName" width="150px" >
  81. <template slot-scope="scope">
  82. <span>{{scope.row.realName}} </span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="订单金额" align="center" prop="totalPrice" >
  86. <template slot-scope="scope">
  87. <span v-if="scope.row.totalPrice!=null">{{scope.row.totalPrice.toFixed(2)}}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="应付金额" align="center" prop="payPrice" >
  91. <template slot-scope="scope">
  92. <span v-if="scope.row.payPrice!=null">{{scope.row.payPrice.toFixed(2)}}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="下单时间" align="center" prop="createTime" />
  96. <el-table-column label="支付方式" align="center" prop="payType" >
  97. <template slot-scope="scope">
  98. <el-tag prop="payType" v-for="(item, index) in payTypeOptions" v-if="scope.row.payType==item.dictValue">{{item.dictLabel}}</el-tag>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="订单类型" align="center" prop="orderType" >
  102. <template slot-scope="scope">
  103. <el-tag prop="status" v-for="(item, index) in orderTypeOptions" v-if="scope.row.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="状态" align="center" prop="status" >
  107. <template slot-scope="scope">
  108. <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="操作" fixed="right" width="80px" align="center" class-name="small-padding fixed-width">
  112. <template slot-scope="scope">
  113. <el-button
  114. size="mini"
  115. type="text"
  116. @click="handleDetails(scope.row)"
  117. v-hasPermi="['store:storeOrder:query']"
  118. >查看</el-button>
  119. </template>
  120. </el-table-column>
  121. </el-table>
  122. <pagination
  123. v-show="total>0"
  124. :total="total"
  125. :page.sync="queryParams.pageNum"
  126. :limit.sync="queryParams.pageSize"
  127. @pagination="getList"
  128. />
  129. <el-drawer
  130. size="75%"
  131. :title="show.title" :visible.sync="show.open"
  132. >
  133. <product-order ref="order" />
  134. </el-drawer>
  135. </div>
  136. </template>
  137. <script>
  138. import { listStoreOrder } from "@/api/store/storeOrder";
  139. import productOrder from "../components/productOrder";
  140. import { getCompanyList } from "@/api/company/company";
  141. export default {
  142. components: { productOrder },
  143. name: "StoreOrder",
  144. data() {
  145. return {
  146. companys:[],
  147. orderTypeOptions:[],
  148. payTypeOptions:[],
  149. show:{
  150. open:false,
  151. title:"订单详情"
  152. },
  153. activeName:"1",
  154. statusOptions:[],
  155. // 遮罩层
  156. loading: true,
  157. // 选中数组
  158. ids: [],
  159. // 非单个禁用
  160. single: true,
  161. // 非多个禁用
  162. multiple: true,
  163. // 显示搜索条件
  164. showSearch: true,
  165. // 总条数
  166. total: 0,
  167. // 订单表格数据
  168. storeOrderList: [],
  169. // 弹出层标题
  170. title: "",
  171. // 是否显示弹出层
  172. open: false,
  173. createTimeRange:[],
  174. // 查询参数
  175. queryParams: {
  176. pageNum: 1,
  177. pageSize: 10,
  178. orderCode: null,
  179. extendOrderId: null,
  180. userId: null,
  181. realName: null,
  182. userPhone: null,
  183. userAddress: null,
  184. cartId: null,
  185. freightPrice: null,
  186. totalNum: null,
  187. totalPrice: null,
  188. totalPostage: null,
  189. payPrice: null,
  190. payPostage: null,
  191. deductionPrice: null,
  192. couponId: null,
  193. couponPrice: null,
  194. paid: null,
  195. payTime: null,
  196. payType: null,
  197. status: null,
  198. refundStatus: null,
  199. refundReasonWapImg: null,
  200. refundReasonWapExplain: null,
  201. refundReasonTime: null,
  202. refundReasonWap: null,
  203. refundReason: null,
  204. refundPrice: null,
  205. deliverySn: null,
  206. deliveryName: null,
  207. deliveryType: null,
  208. deliveryId: null,
  209. gainIntegral: null,
  210. useIntegral: null,
  211. payIntegral: null,
  212. backIntegral: null,
  213. mark: null,
  214. isDel: null,
  215. cost: null,
  216. verifyCode: null,
  217. storeId: null,
  218. shippingType: null,
  219. isChannel: null,
  220. isRemind: null,
  221. isSysDel: null,
  222. isPayRemain:1,
  223. },
  224. // 表单参数
  225. form: {
  226. addressId:null,
  227. userId:null,
  228. },
  229. // 表单校验
  230. rules: {
  231. userId: [
  232. { required: true, message: "会员信息不能为空" }
  233. ],
  234. addressId: [
  235. { required: true, message: "收货信息不能为空" }
  236. ],
  237. },
  238. };
  239. },
  240. created() {
  241. getCompanyList().then(response => {
  242. this.companys = response.data;
  243. });
  244. this.getDicts("store_order_type").then((response) => {
  245. this.orderTypeOptions = response.data;
  246. });
  247. this.getDicts("store_pay_type").then((response) => {
  248. this.payTypeOptions = response.data;
  249. });
  250. this.getDicts("store_order_status").then((response) => {
  251. this.statusOptions = response.data;
  252. });
  253. this.getList();
  254. },
  255. methods: {
  256. handleDetails(row){
  257. this.show.open=true;
  258. const orderId = row.id ;
  259. setTimeout(() => {
  260. this.$refs.order.getOrder(orderId);
  261. }, 500);
  262. },
  263. handleClick(tab, event) {
  264. this.activeName=tab.name;
  265. this.queryParams.isPayRemain=tab.name
  266. console.log(this.queryParams.status)
  267. this.getList();
  268. },
  269. /** 查询订单列表 */
  270. getList() {
  271. this.loading = true;
  272. if(this.queryParams.status=='00'){
  273. this.queryParams.status=null;
  274. }
  275. if(this.createTimeRange!=null&&this.createTimeRange.length==2){
  276. this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
  277. }
  278. else{
  279. this.queryParams.createTimeRange=null;
  280. }
  281. listStoreOrder(this.queryParams).then(response => {
  282. this.storeOrderList = response.rows;
  283. this.total = response.total;
  284. this.loading = false;
  285. });
  286. },
  287. // 取消按钮
  288. cancel() {
  289. this.open = false;
  290. this.reset();
  291. },
  292. // 表单重置
  293. reset() {
  294. this.form = {
  295. addressId:null,
  296. userId:null,
  297. };
  298. this.resetForm("form");
  299. },
  300. /** 搜索按钮操作 */
  301. handleQuery() {
  302. this.queryParams.pageNum = 1;
  303. this.getList();
  304. },
  305. /** 重置按钮操作 */
  306. resetQuery() {
  307. this.resetForm("queryForm");
  308. this.handleQuery();
  309. },
  310. // 多选框选中数据
  311. handleSelectionChange(selection) {
  312. this.ids = selection.map(item => item.id)
  313. this.single = selection.length!==1
  314. this.multiple = !selection.length
  315. },
  316. }
  317. };
  318. </script>
  319. <style scoped lang="scss">
  320. .items{
  321. margin: 5px 0px;
  322. display: flex;
  323. flex-direction: row;
  324. align-items: center;
  325. justify-content: flex-start;
  326. .pic{
  327. width:60px;
  328. height:60px;
  329. }
  330. .goods-content{
  331. margin-left: 10px;
  332. max-width: 200px;
  333. text-align: left;
  334. .goods-title{
  335. overflow:hidden;
  336. white-space: nowrap;
  337. text-overflow: ellipsis;
  338. -o-text-overflow:ellipsis;
  339. }
  340. }
  341. }
  342. .el-message-box__message p{
  343. max-height: 400px;
  344. overflow:scroll;
  345. }
  346. .import-msg{
  347. height: 500px;
  348. overflow: auto;
  349. }
  350. </style>
  351. <style>
  352. .el-descriptions-item__label.is-bordered-label{
  353. font-weight: normal;
  354. }
  355. </style>