engin_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowDetail && !isShowForm && !isShowExamine">
  4. <!-- 筛选条件 -->
  5. <div class="screen-container">
  6. <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
  7. <template #right_btn>
  8. <el-button size="mini" @click="resetScreenForm">清空</el-button>
  9. <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
  10. </template>
  11. <template #left_btn>
  12. <el-checkbox-group v-model="screenForm.status" @change="getList()" size="mini">
  13. <el-checkbox-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
  14. item.label
  15. }}</el-checkbox-button>
  16. </el-checkbox-group>
  17. </template>
  18. <template #search>
  19. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
  20. <el-row :gutter="20">
  21. <el-col :xs="24" :sm="12" :lg="6">
  22. <el-form-item label="工程登录编号" prop="orderNum">
  23. <el-input v-model="screenForm.orderNum" 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="enginNum">
  28. <el-input v-model="screenForm.enginNum" 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="loginNum">
  33. <el-input v-model="screenForm.loginNum" 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="enginName">
  38. <el-input v-model="screenForm.enginName" placeholder="请输入项目名称"></el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :xs="24" :sm="12" :lg="6">
  42. <el-form-item label="单据日期" prop="date">
  43. <el-date-picker
  44. v-model="screenForm.orderDate"
  45. type="datetimerange"
  46. range-separator="至"
  47. style="width: 100%"
  48. value-format="yyyy-MM-dd HH:mm:ss"
  49. start-placeholder="开始日期"
  50. end-placeholder="结束日期"
  51. >
  52. </el-date-picker>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :xs="24" :sm="12" :lg="6">
  56. <el-form-item label="经销商" prop="dealer">
  57. <el-input v-model="screenForm.dealer" placeholder="请输入经销商"></el-input>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :xs="24" :sm="12" :lg="6">
  61. <el-form-item label="使用单位" prop="company">
  62. <el-input v-model="screenForm.company" placeholder="请输入使用单位"></el-input>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :xs="24" :sm="12" :lg="6">
  66. <el-form-item label="制表人" prop="createMan">
  67. <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :xs="24" :sm="12" :lg="6">
  71. <el-form-item label="审核人" prop="examineMan">
  72. <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :xs="24" :sm="12" :lg="6">
  76. <el-form-item label="业务员" prop="salesMan">
  77. <el-select
  78. v-model="screenForm.salesMan"
  79. placeholder="选择业务员"
  80. clearable
  81. filterable
  82. style="width: 100%"
  83. >
  84. <el-option
  85. v-for="item in salesmanList"
  86. :key="item.adminUserId"
  87. :label="item.nickName"
  88. :value="item.adminUserId"
  89. >
  90. </el-option>
  91. </el-select>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :xs="24" :sm="12" :lg="6">
  95. <el-form-item label="规格型号" prop="model">
  96. <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
  97. </el-form-item>
  98. </el-col>
  99. <el-col :xs="24" :sm="12" :lg="6">
  100. <el-form-item label="是否直调" prop="isDirectTransfer">
  101. <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" style="width: 100%">
  102. <el-option :value="null" label="默认"></el-option>
  103. <el-option v-for="item in transfer" :key="item.value" :label="item.label" :value="item.value">
  104. </el-option>
  105. </el-select>
  106. </el-form-item>
  107. </el-col>
  108. </el-row>
  109. </el-form>
  110. </template>
  111. </Collapse>
  112. </div>
  113. <div class="mymain-container">
  114. <div class="btn-group clearfix">
  115. <div class="fl">
  116. <el-button v-if="$checkBtnRole('add', $route.meta.roles)" size="mini" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
  117. </div>
  118. <div class="fr">
  119. <ExportButton :ex-url="'engin-info-order/export'" :ex-params="exParams" />
  120. </div>
  121. </div>
  122. <div class="table">
  123. <el-table
  124. v-loading="listLoading"
  125. :data="dataList"
  126. element-loading-text="Loading"
  127. border
  128. fit
  129. highlight-current-row
  130. stripe
  131. show-summary
  132. :summary-method="$getSummaries"
  133. >
  134. <el-table-column align="left" label="审核状态" sortable prop="examineStatus" min-width="100" show-overflow-tooltip>
  135. <template slot-scope="scope">
  136. {{ scope.row.examineStatus | statusFilter }}
  137. </template>
  138. </el-table-column>
  139. <el-table-column
  140. align="left"
  141. label="工程登录编号"
  142. sortable
  143. prop="enginInfoNo"
  144. min-width="150"
  145. show-overflow-tooltip
  146. >
  147. <template slot-scope="scope">
  148. <CopyButton :copy-text="scope.row.enginInfoNo" />
  149. <span>{{ scope.row.enginInfoNo }}</span>
  150. </template>
  151. </el-table-column>
  152. <el-table-column
  153. align="left"
  154. label="订单日期"
  155. sortable
  156. prop="orderDate"
  157. min-width="120"
  158. show-overflow-tooltip
  159. >
  160. <template slot-scope="scope">
  161. <div>
  162. <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
  163. <el-button v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" />
  164. </div>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. align="left"
  169. label="经销商编码"
  170. sortable
  171. prop="customerNumber"
  172. min-width="120"
  173. show-overflow-tooltip
  174. >
  175. <template slot-scope="scope">
  176. <CopyButton :copy-text="scope.row.customerNumber" />
  177. <span>{{ scope.row.customerNumber }}</span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column
  181. align="left"
  182. label="经销商名称"
  183. sortable
  184. prop="customerName"
  185. min-width="250"
  186. show-overflow-tooltip
  187. >
  188. <template slot-scope="scope">
  189. <CopyButton :copy-text="scope.row.customerName" />
  190. <span>{{ scope.row.customerName }}</span>
  191. </template>
  192. </el-table-column>
  193. <el-table-column align="left" label="项目类别" sortable prop="projectName" min-width="160" show-overflow-tooltip />
  194. <el-table-column align="left" label="使用单位" sortable prop="useUnit" min-width="160" show-overflow-tooltip />
  195. <el-table-column align="left" label="安装地址" sortable prop="installAddress" min-width="160" show-overflow-tooltip />
  196. <el-table-column align="left" label="物料编码" sortable prop="materialNumber" min-width="120" show-overflow-tooltip>
  197. <template slot-scope="scope">
  198. <CopyButton :copy-text="scope.row.materialNumber" />
  199. <span>{{ scope.row.materialNumber }}</span>
  200. </template>
  201. </el-table-column>
  202. <el-table-column
  203. align="left"
  204. label="产品编码"
  205. sortable
  206. prop="materialOldNumber"
  207. min-width="140"
  208. show-overflow-tooltip
  209. >
  210. <template slot-scope="scope">
  211. <CopyButton :copy-text="scope.row.materialOldNumber" />
  212. <span>{{ scope.row.materialOldNumber }}</span>
  213. </template>
  214. </el-table-column>
  215. <el-table-column
  216. align="left"
  217. label="产品名称"
  218. sortable
  219. prop="materialName"
  220. min-width="160"
  221. show-overflow-tooltip
  222. >
  223. <template slot-scope="scope">
  224. <CopyButton :copy-text="scope.row.materialName" />
  225. <span>{{ scope.row.materialName }}</span>
  226. </template>
  227. </el-table-column>
  228. <el-table-column
  229. align="left"
  230. label="规格型号"
  231. sortable
  232. prop="specification"
  233. min-width="350"
  234. show-overflow-tooltip
  235. >
  236. <template slot-scope="scope">
  237. <CopyButton :copy-text="scope.row.specification" />
  238. <span>{{ scope.row.specification }}</span>
  239. </template>
  240. </el-table-column>
  241. <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
  242. <el-table-column align="right" label="数量" prop="qty" min-width="100" sortable show-overflow-tooltip />
  243. <el-table-column align="right" label="已订数量" prop="hasOrderQty" min-width="100" show-overflow-tooltip />
  244. <el-table-column align="right" label="可订数量" prop="compute_kdQty" min-width="100" show-overflow-tooltip>
  245. <template slot-scope="scope">
  246. {{ computeAllowQty(scope.row.qty, scope.row.hasOrderQty) }}
  247. </template>
  248. </el-table-column>
  249. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  250. <template slot-scope="scope">
  251. {{ scope.row.price | numToFixed }}
  252. </template>
  253. </el-table-column>
  254. <el-table-column
  255. align="right"
  256. label="金额"
  257. prop="totalAmount"
  258. min-width="100"
  259. sortable
  260. show-overflow-tooltip
  261. >
  262. <template slot-scope="scope">
  263. {{ scope.row.totalAmount | numToFixed }}
  264. </template>
  265. </el-table-column>
  266. <el-table-column align="left" label="表体业务员" sortable prop="itemServiceName" min-width="110" show-overflow-tooltip />
  267. <el-table-column align="left" label="表头业务员" sortable prop="serviceName" min-width="110" show-overflow-tooltip />
  268. <el-table-column align="left" label="备注" sortable prop="remark" min-width="160" show-overflow-tooltip />
  269. <el-table-column align="left" label="制表人" sortable prop="createName" min-width="100" show-overflow-tooltip />
  270. <el-table-column align="left" label="制表日期" sortable prop="createTime" min-width="160" show-overflow-tooltip />
  271. <el-table-column align="left" label="审核人" sortable prop="confirmName" min-width="100" show-overflow-tooltip />
  272. <el-table-column align="left" label="审核日期" sortable prop="confirmTime" min-width="160" show-overflow-tooltip />
  273. <el-table-column align="center" label="操作" width="210" fixed="right">
  274. <template slot-scope="scope">
  275. <el-popconfirm
  276. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
  277. style="margin-right: 10px;"
  278. title="确定申请吗?"
  279. @onConfirm="handleSubmit(scope.row.enginInfoId)"
  280. >
  281. <el-button slot="reference" type="text">申请</el-button>
  282. </el-popconfirm>
  283. <el-popconfirm
  284. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
  285. style="margin-right: 10px;"
  286. title="确定撤回吗?"
  287. @onConfirm="handleWithdraw(scope.row.enginInfoId)"
  288. >
  289. <el-button slot="reference" type="text">撤回</el-button>
  290. </el-popconfirm>
  291. <el-popconfirm
  292. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
  293. style="margin-right: 10px;"
  294. title="确定弃审吗?"
  295. @onConfirm="handleAbandon(scope.row.enginInfoId)"
  296. >
  297. <el-button slot="reference" type="text">弃审</el-button>
  298. </el-popconfirm>
  299. <el-button
  300. v-if="$checkBtnRole('edit', $route.meta.roles) && (!isDealer || (isDealer && scope.row.examineStatus === 'SAVE'))"
  301. type="text"
  302. @click="toForm(scope.row)"
  303. >
  304. 编辑
  305. </el-button>
  306. <el-button
  307. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
  308. type="text"
  309. @click="toExamine(scope.row)"
  310. >
  311. 审批
  312. </el-button>
  313. <el-button
  314. type="text"
  315. @click="toDetail(scope.row)"
  316. >
  317. 详情
  318. </el-button>
  319. <el-popconfirm
  320. v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
  321. style="margin-left: 10px;"
  322. title="确定删除吗?"
  323. @onConfirm="handleDelete(scope.row.enginInfoId)"
  324. >
  325. <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
  326. </el-popconfirm>
  327. </template>
  328. </el-table-column>
  329. </el-table>
  330. </div>
  331. </div>
  332. <div class="pagination clearfix">
  333. <div class="fr">
  334. <el-pagination
  335. :current-page="currentPage"
  336. :page-sizes="[10, 20, 30, 50]"
  337. :page-size="10"
  338. layout="total, sizes, prev, pager, next, jumper"
  339. :total="listTotal"
  340. @size-change="handleSizeChange"
  341. @current-change="handleCurrentChange"
  342. />
  343. </div>
  344. </div>
  345. </div>
  346. <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" />
  347. <EnginDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
  348. <EnginForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
  349. <EnginExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
  350. </div>
  351. </template>
  352. <script>
  353. import { getEnginList, applyEngin, withdrawEngin, deleteEngin, editDateEngin, abandonEngin } from '@/api/supply/engin'
  354. import { getSalesmanList } from '@/api/common'
  355. import EnginDetail from '@/views/supply/engin/components/engin_detail'
  356. import EnginForm from '@/views/supply/engin/components/engin_form'
  357. import EnginExamine from '@/views/supply/engin/components/engin_examine'
  358. import EditDateDialog from '@/components/Common/edit-date-dialog'
  359. let that
  360. export default {
  361. components: {
  362. EnginDetail,
  363. EnginForm,
  364. EnginExamine,
  365. EditDateDialog
  366. },
  367. filters: {
  368. statusFilter(val) {
  369. const obj = that.statusList.find(o => o.value == val)
  370. return obj ? obj.label : ''
  371. }
  372. },
  373. data() {
  374. return {
  375. currentPage: 1, // 当前页码
  376. pageSize: 10, // 每页数量
  377. listTotal: 0, // 列表总数
  378. dataList: null, // 列表数据
  379. listLoading: false, // 列表加载loading
  380. screenForm: {
  381. // 筛选表单数据
  382. orderNum: '',
  383. enginNum: '',
  384. loginNum: '',
  385. enginName: '',
  386. date: '',
  387. dealer: '',
  388. company: '',
  389. createMan: '',
  390. examineMan: '',
  391. status: [],
  392. salesMan: '',
  393. model: '',
  394. orderDate: '',
  395. isDirectTransfer: null
  396. },
  397. statusList: [
  398. { label: '已保存', value: 'SAVE' },
  399. { label: '待审核', value: 'WAIT' },
  400. { label: '审核通过', value: 'OK' }
  401. // // { label: '审核驳回', value: 'FAIL' },,
  402. // { label: '已关闭', value: 'CLOSE' },
  403. ],
  404. salesmanList: [],
  405. transfer: [
  406. { label: '是', value: true },
  407. { label: '否', value: false }
  408. ],
  409. queryItem: {},
  410. isShowDetail: false,
  411. isShowForm: false,
  412. isShowExamine: false,
  413. isCollapse:true,
  414. editId: null,
  415. isShowEditDateDialog: false,
  416. dateForm: {
  417. date: ''
  418. }
  419. }
  420. },
  421. computed: {
  422. isDealer() {
  423. return JSON.parse(localStorage.getItem('supply_user')).isCustomer
  424. },
  425. exParams() {
  426. return {
  427. enginInfoNo: this.screenForm.orderNum,
  428. projectNo: this.screenForm.enginNum,
  429. enginSignType: this.screenForm.loginNum,
  430. projectName: this.screenForm.enginName,
  431. startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
  432. endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
  433. startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
  434. endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
  435. customerKeyWord: this.screenForm.dealer,
  436. useUnit: this.screenForm.company,
  437. createName: this.screenForm.createMan,
  438. confirmName: this.screenForm.examineMan,
  439. examineStatus: this.screenForm.status.join(','),
  440. serviceId: this.screenForm.salesMan,
  441. specification: this.screenForm.model,
  442. isDirectTransfer: this.screenForm.isDirectTransfer
  443. }
  444. }
  445. },
  446. watch: {
  447. dataList: {
  448. handler(newValue, oldValue) {
  449. if (newValue && newValue.length) {
  450. newValue.forEach((item, index) => {
  451. this.dataList[index].compute_kdQty = this.computeAllowQty(item.qty, item.hasOrderQty)
  452. })
  453. }
  454. },
  455. immediate: true,
  456. deep: true
  457. }
  458. },
  459. beforeCreate() {
  460. that = this
  461. },
  462. created() {
  463. this.getSalesmanList()
  464. this.getList()
  465. },
  466. methods:
  467. {
  468. // 获取业务员列表
  469. getSalesmanList() {
  470. getSalesmanList({
  471. pageNum: 1,
  472. pageSize: -1,
  473. isCustomer: 0,
  474. status: true
  475. }).then(res => {
  476. this.salesmanList = res.data.records
  477. })
  478. },
  479. // 查询列表
  480. getList() {
  481. this.listLoading = true
  482. const params = {
  483. pageNum: this.currentPage,
  484. pageSize: this.pageSize,
  485. enginInfoNo: this.screenForm.orderNum,
  486. projectNo: this.screenForm.enginNum,
  487. enginSignType: this.screenForm.loginNum,
  488. projectName: this.screenForm.enginName,
  489. startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
  490. endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
  491. startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
  492. endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
  493. customerKeyword: this.screenForm.dealer,
  494. useUnit: this.screenForm.company,
  495. createName: this.screenForm.createMan,
  496. confirmName: this.screenForm.examineMan,
  497. examineStatus: this.screenForm.status.join(','),
  498. serviceId: this.screenForm.salesMan,
  499. specification: this.screenForm.model,
  500. isDirectTransfer: this.screenForm.isDirectTransfer
  501. }
  502. getEnginList(params).then((res) => {
  503. res.data.records.forEach(item => {
  504. item.sums1 = ['qty', 'hasOrderQty', 'compute_kdQty']
  505. item.sums2 = ['totalAmount', 'price']
  506. })
  507. this.dataList = res.data.records
  508. this.listTotal = res.data.total
  509. this.listLoading = false
  510. })
  511. },
  512. // 提交筛选表单
  513. submitScreenForm() {
  514. this.currentPage = 1
  515. this.getList()
  516. },
  517. // 重置筛选表单
  518. resetScreenForm() {
  519. this.$refs.screenForm.resetFields()
  520. this.currentPage = 1
  521. this.getList()
  522. },
  523. // 更改每页数量
  524. handleSizeChange(val) {
  525. this.pageSize = val
  526. this.currentPage = 1
  527. this.getList()
  528. },
  529. // 更改当前页
  530. handleCurrentChange(val) {
  531. this.currentPage = val
  532. this.getList()
  533. },
  534. // 进入表单
  535. toForm(item) {
  536. this.queryItem = item
  537. this.isShowForm = true
  538. },
  539. // 进入审批
  540. toExamine(item) {
  541. this.queryItem = item
  542. this.isShowExamine = true
  543. },
  544. // 进入详情
  545. toDetail(item) {
  546. this.queryItem = item
  547. this.isShowDetail = true
  548. },
  549. backList() {
  550. this.queryItem = {}
  551. this.isShowDetail = false
  552. this.isShowForm = false
  553. this.isShowExamine = false
  554. },
  555. // 申请
  556. handleSubmit(id) {
  557. applyEngin({ id }).then(res => {
  558. this.$successMsg()
  559. this.getList()
  560. })
  561. },
  562. // 撤回
  563. handleWithdraw(id) {
  564. withdrawEngin({ id }).then(res => {
  565. this.$successMsg()
  566. this.getList()
  567. })
  568. },
  569. // 弃审
  570. handleAbandon(id) {
  571. abandonEngin({ id }).then(res => {
  572. this.$successMsg()
  573. this.getList()
  574. })
  575. },
  576. // 删除
  577. handleDelete(id) {
  578. deleteEngin({ ids: id }).then(res => {
  579. this.$successMsg()
  580. this.getList()
  581. })
  582. },
  583. // 打开 修改订单日期
  584. editDate(item) {
  585. this.editId = item.enginInfoId
  586. this.dateForm.date = item.orderDate.slice(0, 10)
  587. this.isShowEditDateDialog = true
  588. },
  589. // 提交 修改订单日期
  590. submitDateForm() {
  591. editDateEngin({
  592. enginInfoId: this.editId,
  593. orderDate: this.dateForm.date + ' 00:00:00'
  594. }).then(res => {
  595. this.isShowEditDateDialog = false
  596. this.getList()
  597. this.$successMsg('修改成功')
  598. })
  599. },
  600. computeAllowQty(qty = 0, hasOrderQty = 0) {
  601. const allowQty = qty - hasOrderQty
  602. if (allowQty < 0) {
  603. return 0
  604. }
  605. return allowQty
  606. }
  607. }
  608. }
  609. </script>
  610. <style lang="scss" scoped></style>