index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. v-show="showSearch"
  7. label-width="100px"
  8. size="mini"
  9. >
  10. <el-row>
  11. <el-col :span="6">
  12. <el-form-item label-width="100px" label="系统编号" prop="fBillno">
  13. <el-input
  14. v-model="queryParams.fBillno"
  15. placeholder="请输入系统编号"
  16. clearable
  17. size="small"
  18. @keyup.enter.native="handleQuery"
  19. style="max-width: 230px"
  20. />
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="6">
  24. <el-form-item label-width="100px" label="制单日期" prop="createTime">
  25. <el-date-picker
  26. type="daterange"
  27. value-format="yyyy-MM-dd"
  28. clearable
  29. unlink-panels
  30. style="width: 230px"
  31. range-separator="至"
  32. start-placeholder="开始日期"
  33. end-placeholder="结束日期"
  34. @keyup.enter.native="handleQuery"
  35. v-model="queryParams.createTimeList"
  36. >
  37. </el-date-picker>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="6">
  41. <el-form-item label-width="100px" label="制单人" prop="">
  42. <el-select
  43. v-model="queryParams.createBy"
  44. placeholder="请输入制单人"
  45. clearable
  46. size="small"
  47. filterable
  48. >
  49. <el-option
  50. v-for="(dict, index) in userOptions"
  51. :key="index"
  52. :label="dict.nickName"
  53. :value="dict.userName"
  54. />
  55. </el-select>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label-width="100px" label="原业务类型" prop="fBilltype">
  60. <el-select
  61. v-model="queryParams.fBilltype"
  62. placeholder="请选择原业务类型"
  63. clearable
  64. size="small"
  65. >
  66. <el-option
  67. v-for="(dict, index) in billTypeList"
  68. :key="index.dictValue"
  69. :label="dict.dictLabel"
  70. :value="dict.dictValue"
  71. />
  72. </el-select>
  73. </el-form-item>
  74. </el-col>
  75. </el-row>
  76. <el-collapse-transition>
  77. <div v-show="show">
  78. <el-row>
  79. <el-col :span="6">
  80. <el-form-item label="原客户名称" prop="fCorpid">
  81. <el-select
  82. v-model="queryParams.fCorpid"
  83. placeholder="请输入原客户名称"
  84. clearable
  85. size="small"
  86. filterable
  87. >
  88. <el-option
  89. v-for="(dict, index) in fMblnoOptions"
  90. :key="index.fId"
  91. :label="dict.fName"
  92. :value="dict.fId"
  93. />
  94. </el-select>
  95. </el-form-item>
  96. </el-col>
  97. <!-- <el-col :span="6">-->
  98. <!-- <el-form-item label-width="100px" label="原系统编号" prop="">-->
  99. <!-- <el-input-->
  100. <!-- placeholder="请输入原系统编号"-->
  101. <!-- clearable-->
  102. <!-- size="small"-->
  103. <!-- @keyup.enter.native="handleQuery"-->
  104. <!-- style="max-width: 199px"-->
  105. <!-- v-model="queryParams.fBillno"-->
  106. <!-- />-->
  107. <!-- </el-form-item>-->
  108. <!-- </el-col>-->
  109. <el-col :span="6">
  110. <el-form-item label-width="100px" label="原提单号" prop="">
  111. <el-input
  112. placeholder="请输入原提单号"
  113. clearable
  114. size="small"
  115. @keyup.enter.native="handleQuery"
  116. style="max-width: 199px"
  117. v-model="queryParams.fMblno"
  118. />
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="6">
  122. <el-form-item label-width="100px" label="原业务日期" prop="">
  123. <el-date-picker
  124. type="daterange"
  125. value-format="yyyy-MM-dd"
  126. clearable
  127. style="width: 199px"
  128. range-separator="至"
  129. start-placeholder="开始日期"
  130. end-placeholder="结束日期"
  131. unlink-panels
  132. @keyup.enter.native="handleQuery"
  133. v-model="queryParams.bstimeList"
  134. >
  135. </el-date-picker>
  136. </el-form-item>
  137. </el-col>
  138. </el-row>
  139. </div>
  140. </el-collapse-transition>
  141. </el-form>
  142. <el-row :gutter="10" style="padding-bottom: 10px">
  143. <!-- <el-col :span="1.5">-->
  144. <!-- <el-button-->
  145. <!-- type="primary"-->
  146. <!-- icon="el-icon-plus"-->
  147. <!-- size="mini"-->
  148. <!-- @click="handleAdd"-->
  149. <!-- v-hasPermi="['fleet:plans:add']"-->
  150. <!-- >新增</el-button>-->
  151. <!-- </el-col>-->
  152. <!-- <el-col :span="1.5">-->
  153. <!-- <el-button-->
  154. <!-- type="success"-->
  155. <!-- icon="el-icon-edit"-->
  156. <!-- size="mini"-->
  157. <!-- :disabled="single"-->
  158. <!-- @click="handleUpdate"-->
  159. <!-- v-hasPermi="['warehouseBusiness:inStock:edit']"-->
  160. <!-- >修改-->
  161. <!-- </el-button>-->
  162. <!-- </el-col>-->
  163. <!-- <el-col :span="1.5">-->
  164. <!-- <el-button-->
  165. <!-- type="warning"-->
  166. <!-- icon="el-icon-download"-->
  167. <!-- size="mini"-->
  168. <!-- @click="handleExport"-->
  169. <!-- v-hasPermi="['warehouseBusiness:inStock:export']"-->
  170. <!-- >导出-->
  171. <!-- </el-button>-->
  172. <!-- </el-col>-->
  173. <div class="tabSetting">
  174. <div style="margin-right: 20px">
  175. <el-button
  176. type="cyan"
  177. icon="el-icon-search"
  178. size="mini"
  179. @click="handleQuery"
  180. v-hasPermi="['warehouse:modify:list']"
  181. >搜索</el-button
  182. >
  183. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  184. >重置</el-button
  185. >
  186. <el-button
  187. v-show="show"
  188. @click="show = !show"
  189. icon="el-icon-arrow-up"
  190. size="mini"
  191. >展开</el-button
  192. >
  193. <el-button
  194. v-show="!show"
  195. @click="show = !show"
  196. icon="el-icon-arrow-down"
  197. size="mini"
  198. >展开</el-button
  199. >
  200. </div>
  201. <right-toolbar
  202. :showSearch.sync="showSearch"
  203. @queryTable="getList"
  204. ></right-toolbar>
  205. <div style="margin: 0 12px">
  206. <el-button
  207. icon="el-icon-setting"
  208. size="mini"
  209. circle
  210. @click="showSetting = !showSetting"
  211. ></el-button>
  212. </div>
  213. </div>
  214. </el-row>
  215. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  216. <div>配置排序列数据(拖动调整顺序)</div>
  217. <div style="margin-left: 17px">
  218. <el-checkbox
  219. v-model="allCheck"
  220. label="全选"
  221. @change="allChecked"
  222. ></el-checkbox>
  223. </div>
  224. <div style="padding: 4px; display: flex; justify-content: center">
  225. <draggable
  226. v-model="setRowList"
  227. group="site"
  228. animation="300"
  229. @start="onStart"
  230. @end="onEnd"
  231. handle=".indraggable"
  232. >
  233. <transition-group>
  234. <div
  235. v-for="item in setRowList"
  236. :key="item.surface"
  237. class="listStyle"
  238. >
  239. <div style="width: 500px" class="indraggable">
  240. <div class="progress" :style="{ width: item.width + 'px' }">
  241. <el-checkbox
  242. :label="item.name"
  243. v-model="item.checked"
  244. :true-label="0"
  245. :false-label="1"
  246. >{{ item.name }}
  247. </el-checkbox>
  248. </div>
  249. </div>
  250. <el-input-number
  251. v-model.number="item.width"
  252. controls-position="right"
  253. :min="1"
  254. :max="500"
  255. size="mini"
  256. ></el-input-number>
  257. </div>
  258. </transition-group>
  259. </draggable>
  260. </div>
  261. <span slot="footer" class="dialog-footer">
  262. <el-button @click="showSetting = false">取 消</el-button>
  263. <el-button @click="delRow" type="danger">重 置</el-button>
  264. <el-button type="primary" @click="save()">确 定</el-button>
  265. </span>
  266. </el-dialog>
  267. <el-table
  268. v-loading="loading"
  269. :data="costModifyList"
  270. @selection-change="handleSelectionChange"
  271. style="width: 100%"
  272. ref="table"
  273. :height="tableHeight"
  274. >
  275. <el-table-column type="selection" width="55" align="center" fixed="left" />
  276. <el-table-column
  277. v-for="(item, index) in getRowList"
  278. :key="index"
  279. :label="item.name"
  280. :width="item.width"
  281. :prop="item.label"
  282. align="center"
  283. :show-overflow-tooltip="true"
  284. sortable
  285. :fixed="item.fixed"
  286. >
  287. <template slot-scope="scope">
  288. <span v-if="item.label == 'fCorpid'">
  289. {{ scope.row.fCorpid | corpNameFormat(fMblnoOptions) }}
  290. </span>
  291. <span v-else-if="item.label == 'fGoodsid'">
  292. {{ scope.row.fGoodsid | goodsFormat(goodsOptions) }}
  293. </span>
  294. <span v-else-if="item.label == 'fBilltype'">
  295. {{ scope.row.fBilltype | billTypeFormat(billTypeList) }}
  296. </span>
  297. <span v-else-if="item.label == 'fWarehouseid'">
  298. {{ scope.row.fWarehouseid | warehouseFormat(warehouseOptions) }}
  299. </span>
  300. <span v-else>
  301. {{ scope.row[item.label] }}
  302. </span>
  303. </template>
  304. </el-table-column>
  305. <el-table-column
  306. label="操作"
  307. align="center"
  308. class-name="small-padding fixed-width"
  309. fixed="right"
  310. width="150px"
  311. >
  312. <template slot-scope="scope">
  313. <el-button
  314. size="mini"
  315. type="text"
  316. icon="el-icon-edit"
  317. @click="handleUpdate(scope.row)"
  318. v-hasPermi="['warehouse:modify:query']"
  319. >查看</el-button
  320. >
  321. <!-- <el-button
  322. v-if="scope.row.billStatus != 6"
  323. size="mini"
  324. type="text"
  325. icon="el-icon-edit"
  326. @click="handleUpdate(scope.row)"
  327. v-hasPermi="['fleet:plans:edit']"
  328. >修改</el-button
  329. > -->
  330. <!-- <el-button-->
  331. <!-- size="mini"-->
  332. <!-- type="text"-->
  333. <!-- icon="el-icon-delete"-->
  334. <!-- @click="handleDelete(scope.row)"-->
  335. <!-- v-hasPermi="['fleet:plans:remove']"-->
  336. <!-- >删除</el-button-->
  337. <!-- >-->
  338. </template>
  339. </el-table-column>
  340. </el-table>
  341. <pagination
  342. v-show="total > 0"
  343. :total="total"
  344. :page.sync="queryParams.pageNum"
  345. :limit.sync="queryParams.pageSize"
  346. @pagination="getList"
  347. />
  348. <add-or-update
  349. ref="addOrUpdateRef"
  350. :title="title"
  351. :isDisabled="formDisabled"
  352. :addOrUpdateVisible="addOrUpdateVisible"
  353. @changeShow="showAddOrUpdate"
  354. :form="form"
  355. :feesList="feeList"
  356. :formfeesList="formfeesList"
  357. :goodsOptions="goodsOptions"
  358. :warehouseOptions="warehouseOptions"
  359. :fDc="fDc"
  360. :warehouseId="warehouseId"
  361. :disabledtwo="disabledtwo"
  362. :approVal="approVal"
  363. ></add-or-update>
  364. </div>
  365. </template>
  366. <script>
  367. import { listCorps } from "@/api/basicdata/corps";
  368. import { addSet, resetModule, select } from '@/api/system/set';
  369. import Cookies from 'js-cookie';
  370. import draggable from "vuedraggable";
  371. import AddOrUpdate from "./AddOrUpdate";
  372. import {listWarehouseModify,passWarehouse,detailWarehouseModify} from "@/api/warehouseBusiness/wareHouseModify";
  373. import {listGoods} from "@/api/basicdata/goods";
  374. import {
  375. listWarehouse,
  376. treeselect,
  377. listWarehousesss,
  378. } from "@/api/basicdata/warehouse";
  379. import { listUser } from "@/api/system/user";
  380. export default {
  381. name: "costModify",
  382. components: {
  383. draggable,
  384. AddOrUpdate
  385. },
  386. data() {
  387. return {
  388. // 表格高度
  389. tableHeight: 0,
  390. // 总条数
  391. total: 0,
  392. // 查询参数
  393. queryParams: {
  394. pageNum: 1,
  395. pageSize: 10,
  396. },
  397. showSearch: true,
  398. // 搜索展开/隐藏
  399. show: false,
  400. billTypeList: [],
  401. fMblnoOptions: [],
  402. // 遮罩层
  403. loading: false,
  404. // 主表格数据
  405. costModifyList: [],
  406. // 选中数组
  407. ids: [],
  408. // 非多个禁用
  409. multiple: true,
  410. // 非单个禁用
  411. single: true,
  412. // 自定义列弹窗显示
  413. showSetting: false,
  414. //自定义列宽
  415. allCheck: false,
  416. setRowList: [],
  417. getRowList: [],
  418. drag: false,
  419. tableDate: [
  420. {
  421. surface: "1",
  422. label: "fBillno",
  423. name: "系统编号",
  424. checked: 0,
  425. width: 100,
  426. },
  427. {
  428. surface: "2",
  429. label: "createTime",
  430. name: "制单日期",
  431. checked: 0,
  432. width: 100,
  433. },
  434. {
  435. surface: "3",
  436. label: "createBy",
  437. name: "制单人",
  438. checked: 0,
  439. width: 100,
  440. },
  441. {
  442. surface: "4",
  443. label: "fBilltype",
  444. name: "原业务类型",
  445. checked: 0,
  446. width: 150,
  447. },
  448. {
  449. surface: "5",
  450. label: "fCorpid",
  451. name: "原客户",
  452. checked: 0,
  453. width: 100,
  454. },
  455. // {
  456. // surface: "6",
  457. // label: "fBillno",
  458. // name: "原系统编号",
  459. // checked: 0,
  460. // width: 150,
  461. // },
  462. {
  463. surface: "7",
  464. label: "fMblno",
  465. name: "原提单号",
  466. checked: 0,
  467. width: 100,
  468. },
  469. {
  470. surface: "8",
  471. label: "fBstime",
  472. name: "原业务日期",
  473. checked: 0,
  474. width: 150,
  475. },
  476. {
  477. surface: "9",
  478. label: "fWarehouseid",
  479. name: "原仓库",
  480. checked: 0,
  481. width: 100,
  482. },
  483. {
  484. surface: "10",
  485. label: "fGoodsid",
  486. name: "原品名",
  487. checked: 0,
  488. width: 100,
  489. },
  490. // {
  491. // surface: "11",
  492. // label: "mdLoadDate",
  493. // name: "最终审核人",
  494. // checked: 0,
  495. // width: 150,
  496. // },
  497. // {
  498. // surface: "12",
  499. // label: "mdLoadDate",
  500. // name: "最终审核日期",
  501. // checked: 0,
  502. // width: 180,
  503. // },
  504. // {
  505. // surface: "13",
  506. // label: "mdLoadDate",
  507. // name: "审批意见",
  508. // checked: 0,
  509. // width: 100,
  510. // },
  511. ],
  512. // 子组件弹窗title
  513. title: '',
  514. // 子组件弹窗显示开关
  515. addOrUpdateVisible: false,
  516. // 子组件表格是否禁用
  517. formDisabled: true,
  518. form: {},
  519. feeList: [],
  520. formfeesList: [],
  521. goodsOptions: [],
  522. warehouseOptions: [],
  523. fDc: '',
  524. warehouseId: null,
  525. disabledtwo: false,
  526. approVal: false,
  527. userOptions: [],
  528. }
  529. },
  530. created() {
  531. this.setRowList = this.tableDate;
  532. this.getRowList = this.tableDate;
  533. this.getList();
  534. this.getDicts("data_billtype_type").then((response) => {
  535. this.billTypeList = response.data;
  536. });
  537. listCorps().then((response) => {
  538. this.fMblnoOptions = response.rows;
  539. });
  540. listGoods({fStatus: 0, delFlag: 0}).then((response) => {
  541. this.goodsOptions = response.rows;
  542. });
  543. listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
  544. this.warehouseOptions = response.rows;
  545. });
  546. listUser().then((response) => {
  547. this.userOptions = response.rows;
  548. });
  549. },
  550. activated() {
  551. if (this.$route.query.data) {
  552. this.reset();
  553. this.warehouseId = this.$route.query.data.form.fId
  554. this.fDc = this.$route.query.data.fDc
  555. this.disabledtwo = false
  556. passWarehouse(this.fDc, this.warehouseId).then(res => {
  557. this.form = res.data.data
  558. this.feeList = res.data.data.tWarehousebillsfees
  559. })
  560. this.$nextTick(() => {
  561. this.openDialog()
  562. this.$refs.addOrUpdateRef.init()
  563. })
  564. }
  565. if (this.$route.query.id) {
  566. let id = this.$route.query.id;
  567. console.log(id)
  568. this.reset();
  569. detailWarehouseModify(id).then(res => {
  570. this.form = res.data
  571. this.feeList = res.data.tWarehousebillsfees
  572. this.formfeesList = res.data.warehousebillsfeesModifyList
  573. })
  574. this.disabledtwo = true
  575. this.title = "查看订单";
  576. this.addOrUpdateVisible = true;
  577. this.form.id = id;
  578. this.formDisabled = true
  579. this.approVal = true
  580. this.$refs.addOrUpdateRef.init()
  581. this.$router.push({query: {}});
  582. }
  583. },
  584. mounted() {
  585. this.$nextTick(() => {
  586. // 监听浏览器高度变化,改变表格高度
  587. window.onresize = () => {
  588. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
  589. }
  590. })
  591. },
  592. filters: {
  593. corpNameFormat(row, fMblnoOptions) {
  594. let name;
  595. fMblnoOptions.map((e) => {
  596. if (row == e.fId) {
  597. name = e.fName;
  598. }
  599. });
  600. return name;
  601. },
  602. goodsFormat(row, goodsOptions) {
  603. let name;
  604. goodsOptions.map((e) => {
  605. if (row == e.fId) {
  606. name = e.fName;
  607. }
  608. });
  609. return name;
  610. },
  611. billTypeFormat(row, billTypeList) {
  612. let type;
  613. billTypeList.map((e) => {
  614. if (row == e.dictValue) {
  615. type = e.dictLabel;
  616. }
  617. });
  618. return type;
  619. },
  620. warehouseFormat(row, warehouseOptions) {
  621. let name;
  622. warehouseOptions.map((e) => {
  623. if (row == e.fId) {
  624. name = e.fName;
  625. }
  626. });
  627. return name;
  628. },
  629. },
  630. methods: {
  631. openDialog(){
  632. this.formDisabled = true;
  633. this.title = "查看订单";
  634. // this.$nextTick(() => {
  635. // this.$refs.addOrUpdateRef.init();
  636. // })
  637. this.addOrUpdateVisible = true;
  638. },
  639. getList() {
  640. listWarehouseModify(this.queryParams).then(res => {
  641. this.costModifyList = res.rows
  642. this.total = res.total
  643. this.loading = false;
  644. console.log(this.costModifyList)
  645. })
  646. // 根据浏览器高度设置初始高度
  647. setTimeout(() => {
  648. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
  649. }, 300)
  650. },
  651. /** 搜索按钮操作 */
  652. handleQuery() {
  653. this.queryParams.pageNum = 1;
  654. this.queryParams.pageSize = 10;
  655. if (this.queryParams.createTimeList) {
  656. this.queryParams.createTimeList[0] = this.queryParams.createTimeList[0]+ " " + "00:00:00"
  657. this.queryParams.createTimeList[1] = this.queryParams.createTimeList[1]+ " " + "23:59:59"
  658. }
  659. if (this.queryParams.bstimeList) {
  660. this.queryParams.bstimeList[0] = this.queryParams.bstimeList[0]+ " " + "00:00:00"
  661. this.queryParams.bstimeList[1] = this.queryParams.bstimeList[1]+ " " + "23:59:59"
  662. }
  663. this.getList();
  664. },
  665. /** 重置按钮操作 */
  666. resetQuery() {
  667. this.queryParams = {
  668. pageNum: 1,
  669. pageSize: 10,
  670. }
  671. this.resetForm("queryForm");
  672. this.handleQuery();
  673. },
  674. // 多选框选中数据
  675. handleSelectionChange(selection) {
  676. this.ids = selection.map((item) => item.id);
  677. this.single = selection.length !== 1;
  678. this.multiple = !selection.length;
  679. },
  680. // 表单重置
  681. reset() {
  682. this.form = {
  683. id: null,
  684. billNo: null,
  685. actId: null,
  686. corpId: null,
  687. transUserName: null,
  688. planUserName: null,
  689. billType: null,
  690. transType: null,
  691. transProp: null,
  692. ifContracted: null,
  693. contractNo: null,
  694. refNo: null,
  695. accstlType: null,
  696. accdays: null,
  697. goodsId: null,
  698. goodsPrice: null,
  699. goodsLossType: null,
  700. goodsLossStd: null,
  701. mblno: null,
  702. ysl: null,
  703. voy: null,
  704. pol: null,
  705. pod: null,
  706. qtyPlan: null,
  707. qtyDisPatch: null,
  708. weightPlan: null,
  709. cntrDesc: null,
  710. carNoList: null,
  711. loadAddr: null,
  712. loadAttn: null,
  713. loadAttntel: null,
  714. loadDate: null,
  715. mdLoadAddr: null,
  716. mdLoadAttn: null,
  717. mdLoadAttnTel: null,
  718. mdLoadDate: null,
  719. unLoadAddr: null,
  720. unLoadAttn: null,
  721. unLoadAttnTel: null,
  722. unLoadDate: null,
  723. routeId: null,
  724. routeDesc: null,
  725. ifWaybill: null,
  726. ifNeedinvDr: null,
  727. postDate: null,
  728. billStatus: 0,
  729. delFlag: null,
  730. createBy: null,
  731. createTime: null,
  732. updateBy: null,
  733. updateTime: null,
  734. remarks: null,
  735. };
  736. this.disabled = false;
  737. this.resetForm("form");
  738. this.relevantAttachments = [];
  739. this.allfMblnoOptions = [];
  740. this.feesList = [];
  741. this.formfeesList = [];
  742. },
  743. /** 查看按钮操作 */
  744. handleUpdate(row) {
  745. let id = row.fId;
  746. this.reset();
  747. detailWarehouseModify(id).then(res => {
  748. this.form = res.data
  749. this.feeList = res.data.tWarehousebillsfees
  750. this.formfeesList = res.data.warehousebillsfeesModifyList
  751. this.$nextTick(() => {
  752. this.$refs.addOrUpdateRef.init()
  753. })
  754. })
  755. this.disabledtwo = true
  756. this.title = "查看订单";
  757. this.addOrUpdateVisible = true;
  758. this.form.id = id;
  759. this.formDisabled = true
  760. },
  761. /** 删除按钮操作 */
  762. handleDelete(row) {
  763. const ids = row.id || this.ids;
  764. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  765. confirmButtonText: "确定",
  766. cancelButtonText: "取消",
  767. type: "warning",
  768. })
  769. .then(function () {
  770. return delFtmsorderbills(ids);
  771. })
  772. .then(() => {
  773. this.getList();
  774. this.msgSuccess("删除成功");
  775. });
  776. },
  777. // 新增操作
  778. handleAdd() {
  779. this.reset();
  780. this.title = "新增订单";
  781. this.addOrUpdateVisible = true;
  782. this.formDisabled = false;
  783. },
  784. // 监听 子组件弹窗关闭后触发,有子组件调用
  785. showAddOrUpdate(data) {
  786. if (data === "false") {
  787. this.addOrUpdateVisible = false;
  788. this.$router.push({
  789. path: "/business/costModify",
  790. query: {},
  791. });
  792. this.getList()
  793. } else {
  794. this.addOrUpdateVisible = true;
  795. }
  796. },
  797. // 导出
  798. handleExport() {},
  799. //列设置全选
  800. allChecked() {
  801. if (this.allCheck == true) {
  802. this.setRowList.map((e) => {
  803. return (e.checked = 0);
  804. });
  805. } else {
  806. this.setRowList.map((e) => {
  807. return (e.checked = 1);
  808. });
  809. }
  810. },
  811. //开始拖拽事件
  812. onStart() {
  813. this.drag = true;
  814. },
  815. //拖拽结束事件
  816. onEnd() {
  817. this.drag = false;
  818. },
  819. //重置列表
  820. delRow() {
  821. this.data = {
  822. tableName: "费用变更",
  823. userId: Cookies.get("userName"),
  824. };
  825. resetModule(this.data).then((res) => {
  826. if (res.code == 200) {
  827. this.showSetting = false;
  828. this.setRowList = this.tableDate;
  829. console.log(this.setRowList)
  830. this.getRowList = this.tableDate;
  831. }
  832. });
  833. },
  834. //保存列设置
  835. save() {
  836. this.showSetting = false;
  837. this.data = {
  838. tableName: "船舶信息",
  839. userId: Cookies.get("userName"),
  840. sysTableSetList: this.setRowList,
  841. };
  842. addSet(this.data).then((res) => {
  843. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  844. });
  845. },
  846. }
  847. }
  848. </script>
  849. <style scoped>
  850. </style>