retail_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
  4. <!-- 筛选条件 -->
  5. <div class="screen-container">
  6. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
  7. <el-row :gutter="20">
  8. <el-col :xs="24" :sm="24" :lg="24">
  9. <el-form-item prop="status" label-width="0">
  10. <el-radio-group v-model="screenForm.status" @change="getList()">
  11. <el-radio-button label="">全部</el-radio-button>
  12. <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-radio-button>
  13. </el-radio-group>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :xs="24" :sm="12" :lg="6">
  17. <el-form-item label="订单号" prop="orderNum">
  18. <el-input v-model="screenForm.orderNum" placeholder="请输入订单号"></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :xs="24" :sm="12" :lg="6">
  22. <el-form-item label="产品名称" prop="goodsName">
  23. <el-input v-model="screenForm.goodsName" placeholder="请输入产品名称"></el-input>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :xs="24" :sm="12" :lg="6">
  27. <el-form-item label="规格型号" prop="model">
  28. <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :xs="24" :sm="12" :lg="6">
  32. <el-form-item label="经销商" prop="jxsName">
  33. <el-input v-model="screenForm.jxsName" placeholder="请输入经销商"></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :xs="24" :sm="12" :lg="6">
  37. <el-form-item label="订单日期" prop="date">
  38. <el-date-picker
  39. v-model="screenForm.date"
  40. type="datetimerange"
  41. range-separator="至"
  42. style="width: 100%;"
  43. value-format="yyyy-MM-dd HH:mm:ss"
  44. start-placeholder="开始日期"
  45. end-placeholder="结束日期">
  46. </el-date-picker>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :xs="24" :sm="12" :lg="6">
  50. <el-form-item label="是否直调" prop="isDirectTransfer">
  51. <el-select v-model="screenForm.isDirectTransfer" placeholder="请选择是否直调">
  52. <el-option label="是" :value="true"></el-option>
  53. <el-option label="否" :value="false"></el-option>
  54. </el-select>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :xs="24" :sm="12" :lg="6">
  58. <el-form-item label="制表人" prop="zbMan">
  59. <el-input v-model="screenForm.zbMan" placeholder="请输入制表人"></el-input>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :xs="24" :sm="12" :lg="6">
  63. <el-form-item label="审核人" prop="shMan">
  64. <el-input v-model="screenForm.shMan" placeholder="请输入审核人"></el-input>
  65. </el-form-item>
  66. </el-col>
  67. <!-- <el-col :xs="24" :sm="12" :lg="6">
  68. <el-form-item label="业务员" prop="salesMan">
  69. <el-select v-model="screenForm.salesMan" placeholder="选择业务员" clearable filterable style="width: 100%">
  70. <el-option
  71. v-for="item in salesmanList"
  72. :key="item.adminUserId"
  73. :label="item.nickName"
  74. :value="item.adminUserId">
  75. </el-option>
  76. </el-select>
  77. </el-form-item>
  78. </el-col> -->
  79. <el-col :xs="24" :sm="12" :lg="6">
  80. <el-form-item label="表头业务员" prop="k3ServiceId">
  81. <el-select v-model="screenForm.k3ServiceId" placeholder="选择表头业务员" size="small" clearable filterable style="width: 100%">
  82. <el-option
  83. v-for="item in salesmanList"
  84. :key="item.adminUserId"
  85. :label="item.nickName"
  86. :value="item.adminUserId">
  87. </el-option>
  88. </el-select>
  89. </el-form-item>
  90. </el-col>
  91. <el-col :xs="24" :sm="12" :lg="6">
  92. <el-form-item label="表体业务员" prop="serviceId">
  93. <el-select v-model="screenForm.serviceId" placeholder="选择表体业务员" size="small" clearable filterable style="width: 100%">
  94. <el-option
  95. v-for="item in salesmanList"
  96. :key="item.adminUserId"
  97. :label="item.nickName"
  98. :value="item.adminUserId">
  99. </el-option>
  100. </el-select>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :xs="24" :sm="24" :lg="12" class="tr">
  104. <el-form-item label="">
  105. <el-button @click="resetScreenForm">清空</el-button>
  106. <el-button type="primary" @click="submitScreenForm">搜索</el-button>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. </el-form>
  111. </div>
  112. <div class="mymain-container">
  113. <div class="btn-group clearfix">
  114. <div class="fl">
  115. <el-button size="mini" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
  116. </div>
  117. <div class="fr">
  118. <ExportButton :exUrl="'retail/export'" :exParams="exParams" />
  119. </div>
  120. </div>
  121. <div class="table">
  122. <el-table
  123. v-loading="listLoading"
  124. :data="dataList"
  125. element-loading-text="Loading"
  126. border
  127. fit
  128. highlight-current-row
  129. stripe
  130. show-summary
  131. :summary-method="$getSummaries">
  132. <!-- <el-table-column align="left" label="提货进度" min-width="120" show-overflow-tooltip>
  133. <template slot-scope="scope">
  134. <el-progress :text-inside="true" :stroke-width="26" :percentage="((scope.row.hasSendQty * 100) / (scope.row.totalQty * 100)) || 0"></el-progress>
  135. </template>
  136. </el-table-column> -->
  137. <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
  138. <template slot-scope="scope">
  139. {{scope.row.examineStatus | statusFilter}}
  140. </template>
  141. </el-table-column>
  142. <el-table-column align="left" label="开票状态" prop="isInvoicing" min-width="100" show-overflow-tooltip>
  143. <template slot-scope="scope">
  144. {{scope.row.isInvoicing ? '已开票':'未开票'}}
  145. </template>
  146. </el-table-column>
  147. <el-table-column align="left" label="订单号" prop="id" min-width="140" show-overflow-tooltip>
  148. <template slot-scope="scope">
  149. <CopyButton :copyText="scope.row.id" />
  150. <span>{{scope.row.id}}</span>
  151. </template>
  152. </el-table-column>
  153. <el-table-column align="left" label="订单日期" prop="theTime" min-width="120" show-overflow-tooltip>
  154. <template slot-scope="scope">
  155. <div>
  156. <span>{{scope.row.theTime | dateToDayFilter}}</span>
  157. <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 4px" v-if="$checkBtnRole('date', $route.meta.roles)" @click="editDate(scope.row)" ></el-button>
  158. </div>
  159. </template>
  160. </el-table-column>
  161. <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  162. <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
  163. <template slot-scope="scope">
  164. <CopyButton :copyText="scope.row.materialCode" />
  165. <span>{{scope.row.materialCode}}</span>
  166. </template>
  167. </el-table-column>
  168. <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
  169. <template slot-scope="scope">
  170. <CopyButton :copyText="scope.row.materialOldNumber" />
  171. <span>{{scope.row.materialOldNumber}}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  175. <template slot-scope="scope">
  176. <CopyButton :copyText="scope.row.materialName" />
  177. <span>{{scope.row.materialName}}</span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
  181. <template slot-scope="scope">
  182. <CopyButton :copyText="scope.row.specification" />
  183. <span>{{scope.row.specification}}</span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column align="left" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  187. <el-table-column
  188. align="left"
  189. label="文件编号"
  190. prop="fileNo"
  191. min-width="100"
  192. show-overflow-tooltip
  193. />
  194. <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  195. <template slot-scope="scope">
  196. {{scope.row.isDirectTransfer ? '是':'否'}}
  197. </template>
  198. </el-table-column>
  199. <el-table-column align="right" label="总数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
  200. <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  201. <el-table-column align="right" label="出库数量" prop="hasSendQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  202. <el-table-column align="right" label="可退数量" prop="refundableQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  203. <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
  204. <template slot-scope="scope">
  205. {{ scope.row.price | numToFixed }}
  206. </template>
  207. </el-table-column>
  208. <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="110" sortable show-overflow-tooltip>
  209. <template slot-scope="scope">
  210. {{ scope.row.totalAmount | numToFixed }}
  211. </template>
  212. </el-table-column>
  213. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="110" sortable show-overflow-tooltip>
  214. <template slot-scope="scope">
  215. {{ scope.row.payAmount | numToFixed }}
  216. </template>
  217. </el-table-column>
  218. <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
  219. <el-table-column align="right" label="返利金额" prop="rebateAmount" min-width="110" sortable show-overflow-tooltip>
  220. <template slot-scope="scope">
  221. <div>{{scope.row.rebateAmount | numToFixed}}</div>
  222. </template>
  223. </el-table-column>
  224. <el-table-column align="right" label="实际返利金额" prop="payRebateAmount" min-width="130" sortable show-overflow-tooltip>
  225. <template slot-scope="scope">
  226. <div>{{scope.row.payRebateAmount | numToFixed}}</div>
  227. </template>
  228. </el-table-column>
  229. <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="110" sortable show-overflow-tooltip>
  230. <template slot-scope="scope">
  231. {{ scope.row.totalDiscAmount | numToFixed }}
  232. </template>
  233. </el-table-column>
  234. <el-table-column align="left" label="备注" prop="itemRemark" min-width="160" show-overflow-tooltip></el-table-column>
  235. <el-table-column align="left" label="表头备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  236. <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
  237. <el-table-column align="left" label="表头业务员" prop="k3ServiceName" min-width="100" show-overflow-tooltip></el-table-column>
  238. <el-table-column align="left" label="制表人" prop="createName" min-width="100" show-overflow-tooltip></el-table-column>
  239. <el-table-column align="left" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
  240. <el-table-column align="left" label="审核人" prop="examineName" min-width="100" show-overflow-tooltip></el-table-column>
  241. <el-table-column align="left" label="审核日期" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
  242. <el-table-column align="center" label="操作" width="220" fixed="right">
  243. <template slot-scope="scope">
  244. <el-popconfirm
  245. style="margin-right: 10px;"
  246. title="确定申请吗?"
  247. @onConfirm="handleSubmit(scope.row.id)"
  248. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
  249. <el-button slot="reference" type="text">申请</el-button>
  250. </el-popconfirm>
  251. <el-popconfirm
  252. style="margin-right: 10px;"
  253. title="确定撤回吗?"
  254. @onConfirm="handleWithdraw(scope.row.id)"
  255. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
  256. <el-button slot="reference" type="text">撤回</el-button>
  257. </el-popconfirm>
  258. <el-popconfirm
  259. style="margin-right: 10px;"
  260. title="确定弃审吗?"
  261. @onConfirm="handleAbandon(scope.row.id)"
  262. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
  263. <el-button slot="reference" type="text">弃审</el-button>
  264. </el-popconfirm>
  265. <el-popconfirm
  266. style="margin-right: 10px;"
  267. title="确定关闭吗?"
  268. @onConfirm="handleClose(scope.row.id)"
  269. v-if="$checkBtnRole('examine', $route.meta.roles) && !scope.row.closeTime && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" >
  270. <el-button slot="reference" type="text">关闭</el-button>
  271. </el-popconfirm>
  272. <el-popconfirm
  273. style="margin-right: 10px;"
  274. title="确定删除吗?"
  275. @onConfirm="handleDelete(scope.row.id)"
  276. v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
  277. <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
  278. </el-popconfirm>
  279. <el-button
  280. type="text"
  281. @click="toExamine(scope.row)"
  282. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">
  283. 审批
  284. </el-button>
  285. <el-button
  286. type="text"
  287. @click="toForm(scope.row)"
  288. v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">
  289. 编辑
  290. </el-button>
  291. <el-button
  292. type="text"
  293. @click="toReturn(scope.row)"
  294. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'">
  295. 退订
  296. </el-button>
  297. <el-button
  298. type="text"
  299. @click="toDetail(scope.row)">
  300. 详情
  301. </el-button>
  302. </template>
  303. </el-table-column>
  304. </el-table>
  305. </div>
  306. </div>
  307. <div class="pagination clearfix">
  308. <div class="fr">
  309. <el-pagination
  310. @size-change="handleSizeChange"
  311. @current-change="handleCurrentChange"
  312. :current-page="currentPage"
  313. :page-sizes="[10, 20, 30, 50]"
  314. :page-size="10"
  315. layout="total, sizes, prev, pager, next, jumper"
  316. :total="listTotal">
  317. </el-pagination>
  318. </div>
  319. </div>
  320. </div>
  321. <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
  322. <RetailDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
  323. <RetailForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
  324. <RetailExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
  325. <RetailReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
  326. </div>
  327. </template>
  328. <script>
  329. import { getList, closeData, submitData, editData, abandonData, deleteData, withdrawData } from "@/api/supply/retail";
  330. import { getSalesmanList } from '@/api/common'
  331. import RetailDetail from "@/views/supply/retail/components/retail_detail";
  332. import RetailForm from "@/views/supply/retail/components/retail_form";
  333. import RetailExamine from "@/views/supply/retail/components/retail_examine";
  334. import RetailReturn from "@/views/supply/retail/components/retail_return";
  335. import EditDateDialog from "@/components/Common/edit-date-dialog";
  336. let that
  337. export default {
  338. components: {
  339. RetailDetail,
  340. RetailForm,
  341. RetailExamine,
  342. RetailReturn,
  343. EditDateDialog,
  344. },
  345. filters: {
  346. statusFilter(val) {
  347. let obj = that.statusList.find(o => o.value == val);
  348. return obj ? obj.label : ''
  349. }
  350. },
  351. data() {
  352. return {
  353. currentPage: 1, // 当前页码
  354. pageSize: 10, // 每页数量
  355. listTotal: 0, // 列表总数
  356. dataList: null, // 列表数据
  357. listLoading: false, // 列表加载loading
  358. screenForm: { // 筛选表单数据
  359. orderNum: '',
  360. goodsName: '',
  361. model: '',
  362. jxsName: '',
  363. date: '',
  364. isDirectTransfer: '',
  365. zbMan: '',
  366. shMan: '',
  367. salesMan: '',
  368. status: '',
  369. k3ServiceId:'',
  370. serviceId:''
  371. },
  372. statusList: [
  373. { label: '已保存', value: 'SAVE' },
  374. { label: '待审核', value: 'WAIT' },
  375. { label: '审核通过', value: 'OK' },
  376. { label: '已关闭', value: 'CLOSE' },
  377. ],
  378. salesmanList: [],
  379. queryItem: {},
  380. isShowDetail: false,
  381. isShowForm: false,
  382. isShowExamine: false,
  383. isShowReturn: false,
  384. editId: null,
  385. isShowEditDateDialog: false,
  386. dateForm: {
  387. date: '',
  388. },
  389. }
  390. },
  391. computed: {
  392. exParams() {
  393. return {
  394. examineStatus: this.screenForm.status,
  395. id: this.screenForm.orderNum,
  396. materialName: this.screenForm.goodsName,
  397. specification: this.screenForm.model,
  398. customer: this.screenForm.jxsName,
  399. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  400. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  401. createBy: this.screenForm.zbMan,
  402. examineBy: this.screenForm.shMan,
  403. isDirectTransfer: this.screenForm.isDirectTransfer,
  404. k3ServiceId:this.screenForm.k3ServiceId,
  405. serviceId:this.screenForm.serviceId,
  406. type: 1, // 1:普通零售单,2:政策零售单
  407. }
  408. },
  409. },
  410. beforeCreate() {
  411. that = this;
  412. },
  413. created() {
  414. this.getSalesmanList();
  415. this.getList();
  416. },
  417. methods: {
  418. // 获取业务员列表
  419. getSalesmanList() {
  420. getSalesmanList({
  421. pageNum: 1,
  422. pageSize: -1,
  423. isCustomer: 0,
  424. status: true,
  425. }).then(res => {
  426. this.salesmanList = res.data.records;
  427. })
  428. },
  429. // 查询列表
  430. getList() {
  431. this.listLoading = true;
  432. let params = {
  433. pageNum: this.currentPage,
  434. pageSize: this.pageSize,
  435. examineStatus: this.screenForm.status,
  436. id: this.screenForm.orderNum,
  437. materialName: this.screenForm.goodsName,
  438. specification: this.screenForm.model,
  439. customer: this.screenForm.jxsName,
  440. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  441. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  442. createBy: this.screenForm.zbMan,
  443. examineBy: this.screenForm.shMan,
  444. isDirectTransfer: this.screenForm.isDirectTransfer,
  445. k3ServiceId:this.screenForm.k3ServiceId,
  446. serviceId:this.screenForm.serviceId,
  447. type: 1, // 1:普通零售单,2:政策零售单
  448. };
  449. getList(params).then((res) => {
  450. res.data.records.forEach(item => {
  451. item.sums1 = ['qty', 'directTransferQty', 'hasSendQty', 'refundableQty'];
  452. item.sums2 = ['price', 'totalAmount', 'payAmount', 'rebateAmount', 'payRebateAmount', 'totalDiscAmount'];
  453. })
  454. this.dataList = res.data.records;
  455. this.listTotal = res.data.total;
  456. this.listLoading = false;
  457. })
  458. },
  459. // 提交筛选表单
  460. submitScreenForm() {
  461. this.currentPage = 1;
  462. this.getList();
  463. },
  464. // 重置筛选表单
  465. resetScreenForm() {
  466. this.$refs.screenForm.resetFields();
  467. this.currentPage = 1;
  468. this.getList();
  469. },
  470. // 更改每页数量
  471. handleSizeChange(val) {
  472. this.pageSize = val;
  473. this.currentPage = 1;
  474. this.getList();
  475. },
  476. // 更改当前页
  477. handleCurrentChange(val) {
  478. this.currentPage = val;
  479. this.getList();
  480. },
  481. // 进入表单
  482. toForm(item) {
  483. this.queryItem = item;
  484. this.isShowForm = true;
  485. },
  486. // 进入详情
  487. toDetail(item) {
  488. this.queryItem = item;
  489. this.isShowDetail = true;
  490. },
  491. // 进入审批
  492. toExamine(item) {
  493. this.queryItem = item;
  494. this.isShowExamine = true;
  495. },
  496. // 进入退订
  497. toReturn(item) {
  498. if(item.refundableQty < 1) {
  499. return this.$errorMsg('可退数量为0');
  500. }
  501. this.queryItem = item;
  502. this.isShowReturn = true;
  503. },
  504. backList() {
  505. this.queryItem = {};
  506. this.isShowDetail = false;
  507. this.isShowForm = false;
  508. this.isShowExamine = false;
  509. this.isShowReturn = false;
  510. },
  511. // 关闭
  512. handleClose(id) {
  513. closeData({id}).then(res => {
  514. this.$successMsg();
  515. this.getList();
  516. })
  517. },
  518. // 删除
  519. handleDelete(id) {
  520. deleteData({id}).then(res => {
  521. this.$successMsg();
  522. this.getList();
  523. })
  524. },
  525. // 弃审
  526. handleAbandon(id) {
  527. abandonData({id}).then(res => {
  528. this.$successMsg();
  529. this.getList();
  530. })
  531. },
  532. // 申请
  533. handleSubmit(id) {
  534. submitData({id}).then(res => {
  535. this.$successMsg();
  536. this.getList();
  537. })
  538. },
  539. // 撤回
  540. handleWithdraw(id) {
  541. withdrawData({id}).then(res => {
  542. this.$successMsg();
  543. this.getList();
  544. })
  545. },
  546. // 打开 修改订单日期
  547. editDate(item) {
  548. this.editId = item.id;
  549. this.dateForm.date = item.theTime.slice(0, 10);
  550. this.isShowEditDateDialog = true;
  551. },
  552. // 提交 修改订单日期
  553. submitDateForm() {
  554. editData({
  555. id: this.editId,
  556. theTime: this.dateForm.date + ' 00:00:00',
  557. }).then(res => {
  558. this.isShowEditDateDialog = false;
  559. this.getList();
  560. this.$successMsg('修改成功');
  561. })
  562. },
  563. }
  564. }
  565. </script>
  566. <style lang="scss" scoped>
  567. </style>