You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

776 lines
27 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU:'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" >
  6. <el-option label="全部" value=""></el-option>
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item :label="'模版名称:'">
  16. <el-input v-model="searchData.name" ></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'模版类型:'">
  19. <el-select filterable v-model="searchData.type" clearable style="width: 140px;">
  20. <el-option :label="item" :value="item" v-for="(item,index) in types "
  21. :key="index"></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item :label="' '" >
  25. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
  26. <el-button @click="addModelOpen()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
  27. </el-form-item>
  28. </el-form>
  29. <el-table
  30. @row-click="changeData"
  31. highlight-current-row
  32. :height="height"
  33. :data="dataList"
  34. ref="mainTable"
  35. border
  36. v-loading="dataListLoading"
  37. style="width: 100%;">
  38. <el-table-column
  39. header-align="center"
  40. align="center"
  41. width="100"
  42. fixed="left"
  43. label="操作">
  44. <template slot-scope="scope">
  45. <a type="text" size="small" @click="updateModelOpen(scope.row)">编辑</a>
  46. <a type="text" size="small" @click="deleteEcssTemplate(scope.row)">删除</a>
  47. </template>
  48. </el-table-column>
  49. <el-table-column
  50. v-for="(item,index) in columnList1" :key="index"
  51. :sortable="item.columnSortable"
  52. :prop="item.columnProp"
  53. :header-align="item.headerAlign"
  54. :show-overflow-tooltip="item.showOverflowTooltip"
  55. :align="item.align"
  56. :fixed="item.fixed==''?false:item.fixed"
  57. :min-width="item.columnWidth"
  58. :label="item.columnLabel">
  59. <template slot-scope="scope">
  60. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  61. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  62. style="width: 100px; height: 80px"/></span>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <el-pagination
  67. @size-change="sizeChangeHandle"
  68. @current-change="currentChangeHandle"
  69. :current-page="pageIndex"
  70. :page-sizes="[20, 50, 100, 1000]"
  71. :page-size="pageSize"
  72. :total="totalPage"
  73. layout="total, sizes, prev, pager, next, jumper">
  74. </el-pagination>
  75. <el-dialog title="维护模版信息" :close-on-click-modal="false" v-drag :visible.sync="addModelFlag" width="500px">
  76. <el-form label-position="top" style="margin-left: 2px;margin-top: -5px;">
  77. <el-row :gutter="20">
  78. <el-col :span="12">
  79. <el-form-item :label="'BU:'">
  80. <el-select v-model="addModel.buNo" @change="changeBu" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width: 100%">
  81. <el-option
  82. v-for = "i in buList"
  83. :key = "i.buNo"
  84. :label = "i.buDesc"
  85. :value = "i.buNo">
  86. </el-option>
  87. </el-select>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="12">
  91. <el-form-item :label="''" >
  92. <template #label>
  93. <span slot="label" style="" class="big-label">
  94. <a href="#" @click="openCustom()">客户</a>
  95. </span>
  96. </template>
  97. <el-input v-model="addModel.customName" disabled ></el-input>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="12">
  101. <el-form-item :label="'模版类型'" >
  102. <el-select filterable v-model="addModel.type" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width:100%;">
  103. <el-option :label="item" :value="item" v-for="(item,index) in types "
  104. :key="index"></el-option>
  105. </el-select>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="12">
  109. <el-form-item :label="'模版名称'" >
  110. <el-input v-model="addModel.name"></el-input>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="12" v-show="addModel.type=='发票'">
  114. <el-form-item :label="''" >
  115. <el-checkbox v-model="addModel.hsCodeDesc">品名</el-checkbox>
  116. </el-form-item>
  117. </el-col>
  118. <el-col :span="12" v-show="addModel.type=='发票'">
  119. <el-form-item :label="''" >
  120. <el-checkbox v-model="addModel.contractFlag">合同</el-checkbox>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="12">
  124. <el-form-item :label="'品名类型'" >
  125. <el-radio v-model="addModel.hsCodeDescType" label="Y">中文</el-radio>
  126. <el-radio v-model="addModel.hsCodeDescType" label="N">英文</el-radio>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="12" v-show="addModel.type=='箱单'">
  130. <el-form-item :label="'序号类型'" >
  131. <el-radio v-model="addModel.itemNo" label="Y">序号</el-radio>
  132. <el-radio v-model="addModel.itemNo" label="N">栈板号</el-radio>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="12" v-show="addModel.type=='箱单'">
  136. <el-form-item :label="''" >
  137. <el-checkbox v-model="addModel.upc">UPC</el-checkbox>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="12" v-show="addModel.type=='箱单'">
  141. <el-form-item :label="''" >
  142. <el-checkbox v-model="addModel.so">SO</el-checkbox>
  143. </el-form-item>
  144. </el-col>
  145. <!-- <el-col :span="12" v-show="addModel.type=='箱单'">
  146. <el-form-item :label="''" >
  147. <el-checkbox v-model="addModel.boxChange">显示箱数零头</el-checkbox>
  148. </el-form-item>
  149. </el-col>-->
  150. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  151. <el-form-item :label="''" >
  152. <el-checkbox v-model="addModel.goodsLabel">货物明细</el-checkbox>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  156. <el-form-item :label="''" >
  157. <el-checkbox v-model="addModel.fscWeight">是否维护纯FSC纸重量损耗</el-checkbox>
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="12" v-show="addModel.type=='箱单'">
  161. <el-form-item :label="'Shipping Mark'" >
  162. <el-input v-model="addModel.shippingMark"></el-input>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="12" v-show="addModel.type=='箱单'">
  166. <el-form-item :label="'栈板重量参数'" >
  167. <el-input v-model="addModel.palletWeight"></el-input>
  168. </el-form-item>
  169. </el-col>
  170. <el-col :span="24" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  171. <el-form-item :label="'制造地'" >
  172. <el-input v-model="addModel.origin"></el-input>
  173. </el-form-item>
  174. </el-col>
  175. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  176. <el-form-item :label="'RFID Base Material'" >
  177. <el-checkbox v-model="addModel.material"></el-checkbox>
  178. </el-form-item>
  179. </el-col>
  180. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  181. <el-form-item :label="'HS Code'" >
  182. <el-input :disabled="!addModel.material" v-model="addModel.hsCode"></el-input>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  186. <el-form-item :label="'Non-reusable plastic packaging'" >
  187. <el-checkbox v-model="addModel.packaging"></el-checkbox>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
  191. <el-form-item :label="'plastic packaging'" >
  192. <el-input :disabled="!addModel.packaging" v-model="addModel.kgs"></el-input>
  193. </el-form-item>
  194. </el-col>
  195. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  196. <el-form-item :label="'贸易方式'" >
  197. <el-input v-model="addModel.salesMethod"></el-input>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  201. <el-form-item :label="'币制'" >
  202. <el-input v-model="addModel.currency"></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  206. <el-form-item :label="'货物产地'" >
  207. <el-input v-model="addModel.madeArea"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  211. <el-form-item :label="'发货港'" >
  212. <el-input v-model="addModel.sendPort"></el-input>
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  216. <el-form-item :label="'唛头'" >
  217. <el-input v-model="addModel.voyage"></el-input>
  218. </el-form-item>
  219. </el-col>
  220. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  221. <el-form-item :label="'提/送货日期'" >
  222. <el-input v-model="addModel.deliveryGoodsDate"></el-input>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="12" v-show="addModel.type=='出口货物委托书'">
  226. <el-form-item :label="'船期'" >
  227. <el-input v-model="addModel.shippingDate"></el-input>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="24" v-show="addModel.type=='出口货物委托书'">
  231. <el-form-item :label="'发货人'" >
  232. <el-input type="textarea" :rows="4" v-model="addModel.shipper"></el-input>
  233. </el-form-item>
  234. </el-col>
  235. </el-row>
  236. </el-form>
  237. <el-footer :style="addModel.type=='出口货物委托书'?'height:40px;margin-top: 80px;text-align:center':'height:40px;margin-top: 10px;text-align:center'">
  238. <el-button type="primary" @click="saveEcssTemplate()">保存</el-button>
  239. <el-button type="primary" @click="addModelFlag=false">关闭</el-button>
  240. </el-footer>
  241. </el-dialog>
  242. <el-dialog title="客户" @close="closeCustomDialog" @open="openCustomDialog" :visible.sync="customFlag" width="559px" v-drag>
  243. <el-form inline="inline" label-position="top" :model="customData" style="margin-left: 7px;margin-top: -5px;">
  244. <el-form-item label="客户名称">
  245. <el-input v-model="customData.ccusname" clearable style="width: 200px"></el-input>
  246. </el-form-item>
  247. <el-form-item label=" ">
  248. <el-button type="primary" style="padding: 3px 12px" @click="searchCustomList()">查询</el-button>
  249. </el-form-item>
  250. </el-form>
  251. <el-table
  252. :height="400"
  253. :data="customList"
  254. stripe
  255. highlight-current-row
  256. border
  257. @row-dblclick="customRowDblclick"
  258. style="width: 100%;">
  259. <el-table-column
  260. prop="ccusname"
  261. header-align="left"
  262. align="left"
  263. label="客户名称">
  264. </el-table-column>
  265. </el-table>
  266. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  267. <el-button @click="customFlag = false">关闭</el-button>
  268. </el-footer>
  269. </el-dialog>
  270. <!--列表的组件-->
  271. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  272. </div>
  273. </template>
  274. <script>
  275. import Chooselist from '@/views/modules/common/Chooselist_eam'
  276. import {} from "@/api/sysLanguage.js"
  277. import {
  278. searchEcssTemplateData,
  279. saveEcssTemplateData,
  280. deleteEcssTemplate,
  281. searchCustomList
  282. }from "@/api/ecss/ecss.js"
  283. import {getBuList}from '@/api/factory/site.js'
  284. export default {
  285. name: "null",
  286. components:{
  287. Chooselist,
  288. },
  289. data() {
  290. return {
  291. types: [ '发票', '箱单', '出口货物委托书'],
  292. pageIndex: 1,
  293. pageSize: 100,
  294. totalPage: 0,
  295. height: 200,
  296. buList:[],
  297. dataList:[],
  298. dataList2:[],
  299. dataListLoading: false,
  300. searchData: {
  301. page: 1,
  302. limit: 100,
  303. buNo:'',
  304. type:'',
  305. name:'',
  306. username:this.$store.state.user.name,
  307. },
  308. buttons:{
  309. search:'查询',
  310. },
  311. addModelFlag:false,
  312. addModel:{
  313. addFlag:0,
  314. site:'',
  315. buNo:'',
  316. customName:'',
  317. name:'',
  318. type:'',
  319. upc:'',
  320. so:'',
  321. fscWeight:'',
  322. origin:'',
  323. packaging:'',
  324. kgs:'',
  325. shippingMark:'',
  326. hsCode:'',
  327. palletWeight:'',
  328. material:'',
  329. hsCodeDesc:'',
  330. contractFlag:'',
  331. hsCodeDescType:'',
  332. goodsLabel:'',
  333. remark:'',
  334. boxChange:'',
  335. salesMethod :'EXW',
  336. currency:'USD',
  337. madeArea:'Shanghai, China',
  338. sendPort:'Shanghai, China',
  339. deliveryGoodsDate:'',
  340. voyage:'',
  341. shippingDate:'',
  342. shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
  343. 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
  344. '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
  345. '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n'
  346. },
  347. addDisabledFlag:true,
  348. activeName:'attribute',
  349. columnList1: [
  350. {
  351. userId: this.$store.state.user.name,
  352. functionId: 801007,
  353. serialNumber: '801007Table1BuDesc',
  354. tableId: "801007Table1",
  355. tableName: "EcssTemplate基础信息",
  356. columnProp: "buDesc",
  357. headerAlign: "center",
  358. align: "center",
  359. columnLabel: "BU",
  360. columnHidden: false,
  361. columnImage: false,
  362. columnSortable: false,
  363. sortLv: 0,
  364. status: true,
  365. fixed: '',
  366. columnWidth: 80
  367. },
  368. {
  369. userId: this.$store.state.user.name,
  370. functionId: 801003,
  371. serialNumber: '801007Table1EcssTemplateNo',
  372. tableId: "801007Table1",
  373. tableName: "EcssTemplate基础信息",
  374. columnProp: "customName",
  375. headerAlign: "center",
  376. align: "center",
  377. columnLabel: "客户名称",
  378. columnHidden: false,
  379. columnImage: false,
  380. columnSortable: false,
  381. sortLv: 0,
  382. status: true,
  383. fixed: '',
  384. columnWidth: 200
  385. },
  386. {
  387. userId: this.$store.state.user.name,
  388. functionId: 801003,
  389. serialNumber: '801007Table1EcssTemplateNo',
  390. tableId: "801007Table1",
  391. tableName: "EcssTemplate基础信息",
  392. columnProp: "name",
  393. headerAlign: "center",
  394. align: "center",
  395. columnLabel: "模版名称",
  396. columnHidden: false,
  397. columnImage: false,
  398. columnSortable: false,
  399. sortLv: 0,
  400. status: true,
  401. fixed: '',
  402. columnWidth: 160
  403. },
  404. {
  405. userId: this.$store.state.user.name,
  406. functionId: 801003,
  407. serialNumber: '801007Table1EcssTemplateType',
  408. tableId: "801007Table1",
  409. tableName: "EcssTemplate基础信息",
  410. columnProp: "type",
  411. headerAlign: "center",
  412. align: "center",
  413. columnLabel: "模版类型",
  414. columnHidden: false,
  415. columnImage: false,
  416. columnSortable: false,
  417. sortLv: 0,
  418. status: true,
  419. fixed: '',
  420. columnWidth: 100
  421. },
  422. {
  423. userId: this.$store.state.user.name,
  424. functionId: 801003,
  425. serialNumber: '801007Table1CreateBy',
  426. tableId: "801007Table1",
  427. tableName: "EcssTemplate基础信息",
  428. columnProp: "createBy",
  429. headerAlign: "center",
  430. align: "center",
  431. columnLabel: "创建人",
  432. columnHidden: false,
  433. columnImage: false,
  434. columnSortable: false,
  435. sortLv: 0,
  436. status: true,
  437. fixed: '',
  438. columnWidth: 100
  439. },
  440. {
  441. userId: this.$store.state.user.name,
  442. functionId: 801003,
  443. serialNumber: '801007Table1CreateDate',
  444. tableId: "801007Table1",
  445. tableName: "EcssTemplate基础信息",
  446. columnProp: "createDate",
  447. headerAlign: "center",
  448. align: "center",
  449. columnLabel: "创建日期",
  450. columnHidden: false,
  451. columnImage: false,
  452. columnSortable: false,
  453. sortLv: 0,
  454. status: true,
  455. fixed: '',
  456. columnWidth: 140
  457. },
  458. {
  459. userId: this.$store.state.user.name,
  460. functionId: 801003,
  461. serialNumber: '801007Table1UpdateBy',
  462. tableId: "801007Table1",
  463. tableName: "EcssTemplate基础信息",
  464. columnProp: "updateBy",
  465. headerAlign: "center",
  466. align: "left",
  467. columnLabel: "修改人",
  468. columnHidden: false,
  469. columnImage: false,
  470. columnSortable: false,
  471. sortLv: 0,
  472. status: true,
  473. fixed: '',
  474. columnWidth: 100
  475. },
  476. {
  477. userId: this.$store.state.user.name,
  478. functionId: 801003,
  479. serialNumber: '801007Table1UpdateDate',
  480. tableId: "801007Table1",
  481. tableName: "EcssTemplate基础信息",
  482. columnProp: "updateDate",
  483. headerAlign: "center",
  484. align: "center",
  485. columnLabel: "修改日期",
  486. columnHidden: false,
  487. columnImage: false,
  488. columnSortable: false,
  489. sortLv: 0,
  490. status: true,
  491. fixed: '',
  492. columnWidth: 100
  493. },
  494. {
  495. userId: this.$store.state.user.name,
  496. functionId: 801003,
  497. serialNumber: '801007Table1Remark',
  498. tableId: "801007Table1",
  499. tableName: "EcssTemplate基础信息",
  500. columnProp: "remark",
  501. headerAlign: "center",
  502. align: "left",
  503. columnLabel: "备注",
  504. columnHidden: false,
  505. columnImage: false,
  506. columnSortable: false,
  507. sortLv: 0,
  508. status: true,
  509. fixed: '',
  510. columnWidth: 300
  511. },
  512. ],
  513. currentRow:{},
  514. customFlag:false,
  515. customData:{},
  516. customList:[],
  517. }
  518. },
  519. mounted() {
  520. this.$nextTick(() => {
  521. this.height = (window.innerHeight - 200);
  522. })
  523. },
  524. methods: {
  525. // 获取基础数据列表S
  526. getBaseList(val, type) {
  527. this.tagNo = val
  528. this.$nextTick(() => {
  529. let strVal = ''
  530. if (val === 33) {
  531. strVal = this.addModel.codeNo
  532. }
  533. this.$refs.baseList.init(val, strVal)
  534. })
  535. },
  536. /* 列表方法的回调 */
  537. getBaseData(val) {
  538. if (this.tagNo === 33) {
  539. this.addModel.codeNo = val.Code_No
  540. }
  541. },
  542. // 每页数
  543. sizeChangeHandle (val) {
  544. this.pageSize = val
  545. this.pageIndex = 1
  546. this.searchTable()
  547. },
  548. // 当前页
  549. currentChangeHandle (val) {
  550. this.pageIndex = val
  551. this.searchTable()
  552. },
  553. searchTable(){
  554. this.searchData.limit = this.pageSize
  555. this.searchData.page = this.pageIndex
  556. searchEcssTemplateData(this.searchData).then(({data}) => {
  557. //区分请求成功和失败的状况
  558. if (data && data.code == 0) {
  559. this.dataList = data.page.list
  560. this.pageIndex = data.page.currPage
  561. this.pageSize = data.page.pageSize
  562. this.totalPage = data.page.totalCount
  563. if(this.dataList.length>0){
  564. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  565. this.changeData(this.dataList[0])
  566. }else {
  567. this.changeData(null)
  568. }
  569. } else {
  570. this.dataList = [];
  571. }
  572. });
  573. },
  574. changeData(row){
  575. this.currentRow = JSON.parse(JSON.stringify(row));
  576. this.headerData=row;
  577. this.refreshCurrentTabTable ();
  578. },
  579. refreshCurrentTabTable(){
  580. if(this.currentRow===''||this.currentRow===null){
  581. this.currentRow={site:'',hsCode:'',buNo:'',recordType:'',codeNo:''}
  582. }
  583. },
  584. tabClick (tab, event) {
  585. // 刷新列表数据
  586. this.refreshCurrentTabTable()
  587. },
  588. getBu () {
  589. let tempData = {
  590. username: this.$store.state.user.name,
  591. }
  592. getBuList(tempData).then(({data}) => {
  593. if (data.code === 0) {
  594. this.buList = data.row2
  595. }
  596. })
  597. },
  598. addModelOpen(){
  599. this.addDisabledFlag=true
  600. this.addModel={
  601. addFlag:0,
  602. site:'',
  603. buNo:'',
  604. name:'',
  605. type:'',
  606. upc:'',
  607. so:'',
  608. origin:'',
  609. packaging:'',
  610. fscWeight:'',
  611. kgs:'',
  612. shippingMark:'',
  613. hsCode:'',
  614. palletWeight:'',
  615. material:'',
  616. hsCodeDesc:'',
  617. contractFlag:'',
  618. hsCodeDescType:'',
  619. goodsLabel:true,
  620. remark:'',
  621. boxChange:'',
  622. salesMethod :'EXW',
  623. currency:'USD',
  624. madeArea:'Shanghai, China',
  625. sendPort:'Shanghai, China',
  626. deliveryGoodsDate:'',
  627. voyage:'',
  628. shippingDate:'',
  629. shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
  630. 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
  631. '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
  632. '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n'
  633. }
  634. this.addModelFlag=true
  635. },
  636. updateModelOpen(row){
  637. this.addDisabledFlag=false
  638. this.addModel={
  639. addFlag:1,
  640. site:row.site,
  641. buNo:row.buNo,
  642. name:row.name,
  643. nameNative:row.name,
  644. type:row.type,
  645. upc:row.upc,
  646. so:row.so,
  647. origin:row.origin,
  648. packaging:row.packaging,
  649. itemNo:row.itemNo,
  650. fscWeight:row.fscWeight,
  651. kgs:row.kgs,
  652. shippingMark:row.shippingMark,
  653. hsCode:row.hsCode,
  654. palletWeight:row.palletWeight,
  655. material:row.material,
  656. hsCodeDesc:row.hsCodeDesc,
  657. contractFlag:row.contractFlag,
  658. hsCodeDescType:row.hsCodeDescType,
  659. goodsLabel:row.goodsLabel,
  660. remark:row.remark,
  661. boxChange:row.boxChange,
  662. customName: row.customName,
  663. salesMethod :row.salesMethod,
  664. currency:row.currency,
  665. madeArea:row.madeArea,
  666. sendPort:row.sendPort,
  667. deliveryGoodsDate:row.deliveryGoodsDate,
  668. voyage:row.voyage,
  669. shippingDate:row.shippingDate,
  670. shipper:row.shipper
  671. }
  672. this.addModelFlag=true
  673. },
  674. deleteEcssTemplate(row){
  675. this.$confirm('确认删除?', '提示').then(() => {
  676. deleteEcssTemplate(row).then(({data}) => {
  677. if (data && data.code === 0) {
  678. this.searchTable()
  679. this.$message({
  680. message: '操作成功',
  681. type: 'success',
  682. duration: 1500,
  683. onClose: () => {}
  684. })
  685. } else {
  686. this.$alert(data.msg, '错误', {
  687. confirmButtonText: '确定'
  688. })
  689. }
  690. })
  691. })
  692. },
  693. saveEcssTemplate(){
  694. if(this.addModel.buNo==null||this.addModel.buNo===''){
  695. this.$alert('请选择BU!', '错误', {
  696. confirmButtonText: '确定'
  697. })
  698. return false
  699. }
  700. if(this.addModel.type==null||this.addModel.type===''){
  701. this.$alert('请选择模版类型!', '错误', {
  702. confirmButtonText: '确定'
  703. })
  704. return false
  705. }
  706. if(this.addModel.name==null||this.addModel.name===''){
  707. this.$alert('请输入模版名称!', '错误', {
  708. confirmButtonText: '确定'
  709. })
  710. return false
  711. }
  712. saveEcssTemplateData(this.addModel).then(({data}) => {
  713. if (data && data.code === 0) {
  714. this.searchTable()
  715. this.addModelFlag = false
  716. this.$message({
  717. message: '操作成功',
  718. type: 'success',
  719. duration: 1500,
  720. onClose: () => {}
  721. })
  722. } else {
  723. this.$alert(data.msg, '错误', {
  724. confirmButtonText: '确定'
  725. })
  726. }
  727. })
  728. },
  729. openCustom () {
  730. this.customFlag = true;
  731. },
  732. openCustomDialog () {
  733. //请求
  734. this.searchCustomList();
  735. },
  736. closeCustomDialog () {
  737. this.customList = []
  738. this.customFlag = false
  739. },
  740. searchCustomList () {
  741. searchCustomList(this.customData).then(({data}) => {
  742. if (data && data.code === 0){
  743. this.customList = data.rows;
  744. }
  745. })
  746. },
  747. customRowDblclick (row) {
  748. this.addModel.customName=row.ccusname
  749. this.customFlag = false
  750. },
  751. changeBu(){
  752. this.addModel.kgs=this.addModel.buNo==='03-RFID'?'4.5':this.addModel.buNo==='01-Label'?'2.5':''
  753. }
  754. },
  755. activated() {
  756. this.searchTable()
  757. },
  758. created() {
  759. this.getBu ()
  760. }
  761. }
  762. </script>
  763. <style scoped>
  764. </style>