index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="testParams"
  5. ref="testParams"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="货权方" prop="fCorpid">
  11. <el-input
  12. v-model="testParams.fCorpid"
  13. placeholder="请输入货权方"
  14. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. />
  18. </el-form-item>
  19. <el-form-item label="货物名称" prop="fgoodsid">
  20. <el-select v-model="testParams.fgoodsid" placeholder="请选择">
  21. <el-option
  22. v-for="item in options"
  23. :key="item.value"
  24. :label="item.label"
  25. :value="item.value"
  26. >
  27. </el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item label="提单号" prop="fmblno">
  31. <el-input
  32. v-model="testParams.fmblno"
  33. placeholder="请输入提单号"
  34. clearable
  35. size="small"
  36. @keyup.enter.native="handleQuery"
  37. />
  38. </el-form-item>
  39. <el-form-item label="入库日期" prop="fbsdate">
  40. <el-date-picker
  41. clearable
  42. size="small"
  43. v-model="testParams.fbsdate"
  44. type="date"
  45. value-format="timestamp"
  46. placeholder="选择入库日期"
  47. >
  48. </el-date-picker>
  49. </el-form-item>
  50. <el-form-item>
  51. <el-button
  52. type="cyan"
  53. icon="el-icon-search"
  54. size="mini"
  55. @click="handleQuery"
  56. >搜索
  57. </el-button>
  58. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  59. >重置
  60. </el-button>
  61. </el-form-item>
  62. </el-form>
  63. <el-table
  64. v-loading="loading"
  65. :data="testDate"
  66. @selection-change="handleSelectionChange"
  67. >
  68. <el-table-column type="index" label="序号" align="center" />
  69. <el-table-column label="货主" align="center" prop="hz" />
  70. <el-table-column label="提单号" align="center" prop="tdh" />
  71. <el-table-column label="报关单号" align="center" prop="bgdh" />
  72. <el-table-column label="客户存货单号" align="center" prop="khkhdh" />
  73. <el-table-column label="经营单位" align="center" prop="jydw" />
  74. <el-table-column label="到港日期" align="center" prop="dgrq" />
  75. <el-table-column label="入库日期" align="center" prop="rkrq" />
  76. <el-table-column label="仓库" align="center" prop="ck" />
  77. <el-table-column label="库位" align="center" prop="kw" />
  78. <el-table-column label="货物名称" align="center" prop="hwmc" />
  79. <el-table-column label="包装规格" align="center" prop="bzgg" />
  80. <el-table-column label="计费单位" align="center" prop="jfdw" />
  81. <el-table-column label="入库毛重" align="center" prop="rkmz" />
  82. <el-table-column label="入库净重" align="center" prop="rkjz" />
  83. <el-table-column label="入库尺码" align="center" prop="rucm" />
  84. <el-table-column label="入库件数" align="center" prop="rkjs" />
  85. <el-table-column label="出库毛重" align="center" prop="ckmz" />
  86. <el-table-column label="出库净重" align="center" prop="ckjz" />
  87. <el-table-column label="出库尺码" align="center" prop="ckcm" />
  88. <el-table-column label="出库件数" align="center" prop="ckjs" />
  89. <el-table-column label="结余毛重" align="center" prop="jymz" />
  90. <el-table-column label="结余净重" align="center" prop="jyjz" />
  91. <el-table-column label="结余尺码" align="center" prop="jycm" />
  92. <el-table-column label="结余件数" align="center" prop="jyjs" />
  93. </el-table>
  94. </div>
  95. </template>
  96. <script>
  97. import {
  98. listWarehousebills,
  99. getWarehousebills,
  100. delWarehousebills,
  101. addWarehousebills,
  102. updateWarehousebills,
  103. exportWarehousebills,
  104. } from "@/api/warehouseBusiness/warehouseInStock";
  105. import { listCorps } from "@/api/basicdata/corps";
  106. import { listWarehouse } from "@/api/basicdata/warehouse";
  107. import { listGoods } from "@/api/basicdata/goods";
  108. import { listUser, queryUserVal } from "@/api/system/user";
  109. export default {
  110. name: "Warehousebills",
  111. components: {},
  112. data() {
  113. return {
  114. testDate: [
  115. {
  116. hz: "易车配",
  117. tdh: "M098765",
  118. bgdh: "6789593",
  119. khkhdh: "CH098",
  120. jydw: "易车配",
  121. dgrq: "2020/1/1",
  122. rkrq: "2020/1/4",
  123. ck: "1号库",
  124. kw: "K1",
  125. hwmc: "棉花",
  126. bzgg: "5*5",
  127. jfdw: "尺码",
  128. rkmz: "1000",
  129. rkjz: "900",
  130. rucm: "100",
  131. rkjs: "5",
  132. ckmz: "1312",
  133. ckjz: "22",
  134. ckcm: "123",
  135. ckjs: "12",
  136. jymz: "213",
  137. jyjz: "321",
  138. jycm: "321",
  139. jyjs: "44",
  140. },
  141. {
  142. hz: "中外运",
  143. tdh: "Z089222",
  144. bgdh: "8890879",
  145. khkhdh: "CH200",
  146. jydw: "中棉",
  147. dgrq: "2020/1/1",
  148. rkrq: "2020/1/4",
  149. ck: "1号库",
  150. kw: "K1",
  151. hwmc: "棉花",
  152. bzgg: "5*5",
  153. jfdw: "尺码",
  154. rkmz: "1000",
  155. rkjz: "900",
  156. rucm: "100",
  157. rkjs: "5",
  158. ckmz: "10",
  159. ckjz: "10",
  160. ckcm: "10",
  161. ckjs: "10",
  162. jymz: "10",
  163. jyjz: "10",
  164. jycm: "10",
  165. jyjs: "10",
  166. },
  167. ],
  168. testParams: {
  169. fCorpid:"",
  170. fmblno:"",
  171. fbsdate:"",
  172. fgoodsid: ""
  173. },
  174. options:[
  175. {
  176. value: "选项1",
  177. label: "棉花",
  178. },
  179. {
  180. value: "选项2",
  181. label: "钢铁",
  182. }
  183. ],
  184. // 遮罩层
  185. loading: true,
  186. // 选中数组
  187. ids: [],
  188. userVal: {
  189. userName: null,
  190. nickName: null,
  191. deptId: null,
  192. },
  193. queryForm: {},
  194. dataList: [],
  195. warehouseCrList: [],
  196. warehouseDrList: [],
  197. browseStatus: false,
  198. relevantAttachments: [],
  199. // 非单个禁用
  200. single: true,
  201. // 非多个禁用
  202. multiple: true,
  203. // 显示搜索条件
  204. showSearch: true,
  205. // 总条数
  206. total: 0,
  207. // 仓库主(出入库)表格数据
  208. warehousebillsList: [],
  209. // 弹出层标题
  210. title: "",
  211. // 是否显示弹出层
  212. open: false,
  213. // 货权方(客户数据)
  214. fMblnoOptions: [],
  215. // 货权方(客户数据)
  216. fSbuOptions: [],
  217. // 操作员
  218. userOptions: [],
  219. // 操作员
  220. goodsOptions: [],
  221. // 制单部门
  222. deptOptions: [],
  223. // 仓库(仓库数据)
  224. warehouseOptions: [],
  225. // 贸易方式(数据字典),对应t_trademodels 字典
  226. fTrademodeidOptions: [],
  227. // 计费单位(数据字典),下拉选择毛重或净重字典
  228. fFeetunitOptions: [],
  229. // 结算方式(数据字典),下拉选择字典
  230. fStltypeOptions: [],
  231. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  232. fIfweighOptions: [],
  233. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  234. fIfpledgeOptions: [],
  235. // 是否破损(数据字典),默认F否则T字典
  236. fIfdamageOptions: [],
  237. // 单据类型(数据字典)SJRK字典
  238. fBilltypeOptions: [],
  239. // 状态(数据字典),N 入字典
  240. fBillstatusOptions: [],
  241. // 查询参数
  242. queryParams: {
  243. pageNum: 1,
  244. pageSize: 10,
  245. fBillno: null,
  246. createBy: null,
  247. createTime: null,
  248. fCustomsdeclartion: null,
  249. fOriginalbillno: null,
  250. fDeptid: null,
  251. fBsdeptid: null,
  252. fContacts: null,
  253. fTel: null,
  254. fCorpid: null,
  255. fTocorpid: null,
  256. fStltypeid: null,
  257. fBscorpno: null,
  258. fWarehouseid: null,
  259. fStorekeeper: null,
  260. fBsdate: null,
  261. fPlanqty: null,
  262. fPlangrossweight: null,
  263. fPlannetweight: null,
  264. fPlanvolumn: null,
  265. fQty: null,
  266. fGrossweight: null,
  267. fNetweight: null,
  268. fVolumn: null,
  269. fTrademodeid: null,
  270. fSbu: null,
  271. fFeetunit: null,
  272. fMblno: null,
  273. fVslvoy: null,
  274. fEta: null,
  275. fCustomno: null,
  276. fIfweigh: null,
  277. fIfpledge: null,
  278. fIfdamage: null,
  279. fBankcorpid: null,
  280. fBilltype: null,
  281. fBillstatus: null,
  282. fCreateby: null,
  283. fCreatetime: null,
  284. fGoodsid: null,
  285. fCntrtype: null,
  286. fCntqty: null,
  287. },
  288. // 表单参数
  289. form: {},
  290. // 表单校验
  291. rules: {
  292. fDeptid: [
  293. { required: true, message: "制单部门不能为空", trigger: "blur" },
  294. ],
  295. fBsdeptid: [
  296. { required: true, message: "业务所属部门不能为空", trigger: "blur" },
  297. ],
  298. fCorpid: [
  299. {
  300. required: true,
  301. message:
  302. "客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空",
  303. trigger: "blur",
  304. },
  305. ],
  306. fTocorpid: [
  307. {
  308. required: true,
  309. message:
  310. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  311. trigger: "blur",
  312. },
  313. ],
  314. fBscorpno: [
  315. {
  316. required: true,
  317. message:
  318. "客户存货编号,格式编号客户编号+YYYY +NNNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始不能为空",
  319. trigger: "blur",
  320. },
  321. ],
  322. },
  323. };
  324. },
  325. created() {
  326. this.getList();
  327. this.getDicts("data_trademodes").then((response) => {
  328. this.fTrademodeidOptions = response.data;
  329. });
  330. this.getDicts("data_unitfees").then((response) => {
  331. this.fFeetunitOptions = response.data;
  332. });
  333. this.getDicts("data_stltype_type").then((response) => {
  334. this.fStltypeOptions = response.data;
  335. });
  336. this.getDicts("data_ifweigh_status").then((response) => {
  337. this.fIfweighOptions = response.data;
  338. });
  339. this.getDicts("data_ifpledge_status").then((response) => {
  340. this.fIfpledgeOptions = response.data;
  341. });
  342. this.getDicts("data_ifdamage_status").then((response) => {
  343. this.fIfdamageOptions = response.data;
  344. });
  345. this.getDicts("data_billtype_type").then((response) => {
  346. this.fBilltypeOptions = response.data;
  347. });
  348. this.getDicts("sys_common_status").then((response) => {
  349. this.fBillstatusOptions = response.data;
  350. });
  351. },
  352. methods: {
  353. // 添加list
  354. addRelevant() {
  355. console.log(JSON.stringify(this.dataList));
  356. this.dataList.push({
  357. fbsdate: null,
  358. fgoodsid: null,
  359. fcntrtype: null,
  360. fCntqty: null,
  361. fplangrossweight: null,
  362. fplanvolumn: null,
  363. fplanqty: null,
  364. fgrossweight: null,
  365. fqty: null,
  366. fPackagespecs: null,
  367. fwarehouselocid: null,
  368. fBoxno: null,
  369. fGoodsval: null,
  370. ftruckno: null,
  371. remark: null,
  372. });
  373. },
  374. addRelevt() {
  375. this.relevantAttachments.push({
  376. attachName: null,
  377. opUserName: null,
  378. opDate: null,
  379. attachId: null,
  380. });
  381. },
  382. // 收款信息
  383. addCollection() {
  384. var obj = {};
  385. this.warehouseDrList.push(obj);
  386. },
  387. addpayment() {
  388. var obj = {};
  389. this.warehouseCrList.push(obj);
  390. },
  391. queryUser() {
  392. queryUserVal().then((response) => {
  393. if (response.user !== null) {
  394. this.userVal = response.user;
  395. this.$set(this.form, "fDeptid", this.userVal.deptId);
  396. this.$set(this.form, "createBy", this.userVal.userName);
  397. this.$set(this.form, "createTime", Date.parse(new Date()));
  398. }
  399. if (response.dept !== null) {
  400. this.deptOptions = [];
  401. this.deptOptions.push(response.dept);
  402. }
  403. });
  404. },
  405. /** 查询仓库主(出入库)列表 */
  406. getList() {
  407. this.loading = true;
  408. listWarehousebills(this.queryParams).then((response) => {
  409. this.warehousebillsList = response.rows;
  410. this.total = response.total;
  411. this.loading = false;
  412. });
  413. },
  414. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  415. fTrademodeidFormat(row, column) {
  416. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  417. },
  418. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  419. fFeetunitFormat(row, column) {
  420. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  421. },
  422. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  423. fIfweighFormat(row, column) {
  424. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  425. },
  426. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  427. fIfpledgeFormat(row, column) {
  428. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  429. },
  430. // 是否破损(数据字典),默认F否则T字典翻译
  431. fIfdamageFormat(row, column) {
  432. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  433. },
  434. // 单据类型(数据字典)SJRK字典翻译
  435. fBilltypeFormat(row, column) {
  436. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  437. },
  438. // 状态(数据字典),N 入字典翻译
  439. fBillstatusFormat(row, column) {
  440. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  441. },
  442. // 取消按钮
  443. cancel() {
  444. this.open = false;
  445. this.reset();
  446. },
  447. // 表单重置
  448. reset() {
  449. this.form = {
  450. fId: null,
  451. fBillno: null,
  452. fCustomsdeclartion: null,
  453. fOriginalbillno: null,
  454. fDeptid: null,
  455. fBsdeptid: null,
  456. fContacts: null,
  457. fTel: null,
  458. fCorpid: null,
  459. fTocorpid: null,
  460. fStltypeid: null,
  461. fBscorpno: null,
  462. fWarehouseid: null,
  463. fStorekeeper: null,
  464. fBsdate: null,
  465. fPlanqty: null,
  466. fPlangrossweight: null,
  467. fPlannetweight: null,
  468. fPlanvolumn: null,
  469. fQty: null,
  470. fGrossweight: null,
  471. fNetweight: null,
  472. fVolumn: null,
  473. fTrademodeid: null,
  474. fSbu: null,
  475. fFeetunit: null,
  476. fMblno: null,
  477. fVslvoy: null,
  478. fEta: null,
  479. fCustomno: null,
  480. fIfweigh: null,
  481. fIfpledge: null,
  482. fIfdamage: null,
  483. fBankcorpid: null,
  484. fBilltype: null,
  485. fBillstatus: null,
  486. delFlag: null,
  487. createBy: null,
  488. createTime: null,
  489. updateBy: null,
  490. updateTime: null,
  491. remark: null,
  492. fCreateby: null,
  493. fCreatetime: null,
  494. fGoodsid: null,
  495. fCntrtype: null,
  496. fCntqty: null,
  497. };
  498. this.resetForm("form");
  499. },
  500. /** 搜索按钮操作 */
  501. handleQuery() {
  502. this.queryParams.pageNum = 1;
  503. this.getList();
  504. },
  505. /** 重置按钮操作 */
  506. resetQuery() {
  507. this.testParams={
  508. fCorpid:null,
  509. fmblno:null,
  510. fbsdate:null,
  511. fgoodsid:null,
  512. },
  513. this.resetForm("queryForm");
  514. this.handleQuery();
  515. },
  516. // 多选框选中数据
  517. handleSelectionChange(selection) {
  518. this.ids = selection.map((item) => item.fId);
  519. this.single = selection.length !== 1;
  520. this.multiple = !selection.length;
  521. },
  522. checkType() {},
  523. /** 新增按钮操作 */
  524. handleAdd() {
  525. this.reset();
  526. this.queryUser();
  527. this.open = true;
  528. this.title = "入库单";
  529. },
  530. /** 修改按钮操作 */
  531. handleUpdate(row) {
  532. this.reset();
  533. const fId = row.fid || this.ids;
  534. getWarehousebills(row.fid).then((response) => {
  535. this.form = response.data.warehousebills;
  536. this.$set(this.form, "fCorpid", response.data.warehousebills.fcorpid);
  537. this.$set(
  538. this.form,
  539. "fWarehouseid",
  540. response.data.warehousebills.fwarehouseid
  541. );
  542. this.$set(
  543. this.form,
  544. "fContacts",
  545. response.data.warehousebills.fcontacts
  546. );
  547. this.$set(this.form, "fTel", response.data.warehousebills.ftel);
  548. this.$set(this.form, "fMblno", response.data.warehousebills.fmblno);
  549. this.$set(
  550. this.form,
  551. "fBsdate",
  552. Date.parse(response.data.warehousebills.fbsdate)
  553. );
  554. this.$set(
  555. this.form,
  556. "fStorekeeper",
  557. response.data.warehousebills.fstorekeeper
  558. );
  559. this.$set(this.form, "createBy", response.data.warehousebills.createBy);
  560. this.$set(this.form, "fDeptid", response.data.warehousebills.fdeptid);
  561. this.$set(
  562. this.form,
  563. "fDilldate",
  564. Date.parse(response.data.warehousebills.fbilldate)
  565. );
  566. this.$set(this.form, "fVslvoy", response.data.warehousebills.fvslvoy);
  567. this.$set(
  568. this.form,
  569. "fEta",
  570. Date.parse(response.data.warehousebills.feta)
  571. );
  572. this.$set(
  573. this.form,
  574. "createTime",
  575. Date.parse(response.data.warehousebills.createTime)
  576. );
  577. this.$set(
  578. this.form,
  579. "fTrademodeid",
  580. response.data.warehousebills.ftrademodeid + ""
  581. );
  582. this.$set(
  583. this.form,
  584. "fBillingway",
  585. response.data.warehousebills.fbillingway + ""
  586. );
  587. this.$set(
  588. this.form,
  589. "fFeetunit",
  590. response.data.warehousebills.ffeetunit + ""
  591. );
  592. this.$set(
  593. this.form,
  594. "fBscorpno",
  595. response.data.warehousebills.fbscorpno
  596. );
  597. this.$set(
  598. this.form,
  599. "fCustomno",
  600. response.data.warehousebills.fcustomno
  601. );
  602. this.$set(
  603. this.form,
  604. "fStltypeid",
  605. response.data.warehousebills.fstltypeid + ""
  606. );
  607. this.$set(
  608. this.form,
  609. "fIfweigh",
  610. response.data.warehousebills.fifweigh + ""
  611. );
  612. this.$set(
  613. this.form,
  614. "fIfdamage",
  615. response.data.warehousebills.fifdamage + ""
  616. );
  617. this.$set(this.form, "fSbu", response.data.warehousebills.fsbu);
  618. this.$set(
  619. this.form,
  620. "fIfpledge",
  621. response.data.warehousebills.fifpledge + ""
  622. );
  623. this.$set(
  624. this.form,
  625. "fBankcorpid",
  626. response.data.warehousebills.fbankcorpid
  627. );
  628. this.$set(this.form, "remark", response.data.warehousebills.remark);
  629. this.deptOptions = [];
  630. this.deptOptions.push(response.data.dept);
  631. this.fMblnoOptions = [];
  632. this.fMblnoOptions.push(response.data.fCorps);
  633. if (response.data.fSbu !== null) {
  634. this.fSbuOptions = [];
  635. this.fSbuOptions.push(response.data.fSbu);
  636. }
  637. if (response.data.warehouse !== null) {
  638. this.warehouseOptions = [];
  639. this.warehouseOptions.push(response.data.warehouse);
  640. }
  641. if (
  642. typeof response.data.warehouseBillsItem !== "undefined" &&
  643. response.data.warehouseBillsItem !== null
  644. ) {
  645. this.dataList = response.data.warehouseBillsItem;
  646. if (response.data.goodsList !== null) {
  647. this.goodsOptions = [];
  648. this.goodsOptions = response.data.goodsList;
  649. }
  650. }
  651. this.open = true;
  652. this.title = "修改仓库主(出入库)";
  653. });
  654. },
  655. /** 提交按钮 */
  656. submitForm() {
  657. this.$refs["form"].validate((valid) => {
  658. if (valid) {
  659. // let formData = new FormData()
  660. // console.log(JSON.stringify(this.form));
  661. // formData.append('tWarehouseBills', JSON.stringify(this.formData))
  662. let formData = new window.FormData();
  663. // 附件数据
  664. formData.append("tWarehouseBills", JSON.stringify(this.form));
  665. console.log(JSON.stringify(this.form));
  666. // 附件数据
  667. formData.append("tWhgenleg", null);
  668. // // 费用明细付款
  669. formData.append(
  670. "tWarehousebillsfeesCr",
  671. JSON.stringify(this.warehouseCrList)
  672. );
  673. // // 收款
  674. formData.append(
  675. "tWarehousebillsfeesDr",
  676. JSON.stringify(this.warehouseDrList)
  677. );
  678. // // 库存明细
  679. formData.append(
  680. "tWarehousebillsitems",
  681. JSON.stringify(this.dataList)
  682. );
  683. // 附件数据
  684. // formData.append('tWhgenleg', dataForm)
  685. // // 费用明细付款
  686. // formData.append('tWarehousebillsfeesCr', dataForm)
  687. // // 收款
  688. // formData.append('tWarehousebillsfeesDr"', dataForm)
  689. // // 库存明细
  690. // formData.append('tWarehousebillsitems', dataForm)
  691. addWarehousebills(formData).then((response) => {
  692. console.log(response);
  693. this.msgSuccess("新增成功");
  694. this.open = false;
  695. this.getList();
  696. });
  697. }
  698. });
  699. },
  700. /** 删除按钮操作 */
  701. handleDelete(row) {
  702. const fIds = row.fId || this.ids;
  703. this.$confirm(
  704. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  705. "警告",
  706. {
  707. confirmButtonText: "确定",
  708. cancelButtonText: "取消",
  709. type: "warning",
  710. }
  711. )
  712. .then(function () {
  713. return delWarehousebills(fIds);
  714. })
  715. .then(() => {
  716. this.getList();
  717. this.msgSuccess("删除成功");
  718. });
  719. },
  720. /** 导出按钮操作 */
  721. handleExport() {
  722. const queryParams = this.queryParams;
  723. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  724. confirmButtonText: "确定",
  725. cancelButtonText: "取消",
  726. type: "warning",
  727. })
  728. .then(function () {
  729. return exportWarehousebills(queryParams);
  730. })
  731. .then((response) => {
  732. this.download(response.msg);
  733. });
  734. },
  735. deleteRow(index, rows) {
  736. rows.splice(index, 1);
  737. },
  738. /* 远程模糊查询用户 */
  739. corpsRemoteMethod(name) {
  740. if (name == null || name === "") {
  741. return false;
  742. }
  743. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  744. listCorps(queryParams).then((response) => {
  745. this.fMblnoOptions = response.rows;
  746. });
  747. },
  748. /* 远程模糊查询商品 */
  749. goodsRemoteMethod(name) {
  750. if (name == null || name === "") {
  751. return false;
  752. }
  753. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  754. listGoods(queryParams).then((response) => {
  755. this.goodsOptions = response.rows;
  756. });
  757. },
  758. /* 远程模糊查询经营单位 */
  759. fSbuRemoteMethod(name) {
  760. if (name == null || name === "") {
  761. return false;
  762. }
  763. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  764. listCorps(queryParams).then((response) => {
  765. this.fSbuOptions = response.rows;
  766. });
  767. },
  768. /* 远程模糊查询仓库 */
  769. warehouseRemoteMethod(name) {
  770. if (name == null || name === "") {
  771. return false;
  772. }
  773. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  774. listWarehouse(queryParams).then((response) => {
  775. this.warehouseOptions = response.rows;
  776. });
  777. },
  778. /* 远程模糊查询操作用户 */
  779. userRemoteMethod(name) {
  780. if (name == null || name === "") {
  781. return false;
  782. }
  783. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  784. listUser(queryParams).then((response) => {
  785. this.userOptions = response.rows;
  786. });
  787. },
  788. },
  789. };
  790. </script>