plm前端
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.

474 lines
16 KiB

2 years ago
1 year ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <printFlexo ref="printFlexo"></printFlexo>
  4. <el-form label-position="top" style="margin-top: 5px; margin-left: 0px;" >
  5. <el-form-item >
  6. <el-button type="primary" @click="colorSearch(true)" >刷新</el-button>
  7. <el-button type="primary" @click="newColor()" v-if="!ifDisableFlag">新增</el-button>
  8. <el-button type="primary" @click="colorSaveBatch()" v-if="!ifDisableFlag">一键导入</el-button>
  9. </el-form-item>
  10. <el-table
  11. height="400"
  12. :data="colorTable"
  13. border
  14. style="width: 100%">
  15. <el-table-column
  16. prop=""
  17. header-align="center"
  18. align="center"
  19. min-width="80"
  20. v-if="!ifDisableFlag"
  21. label="操作">
  22. <template slot-scope="scope">
  23. <a type="text" size="small" @click="updateColor(scope.row)">编辑</a>
  24. <a type="text" size="small" @click="deleteColor(scope.row)">删除</a>
  25. </template>
  26. </el-table-column>
  27. <el-table-column label="印刷面" header-align="center">
  28. <el-table-column
  29. prop="printSide"
  30. header-align="center"
  31. align="left"
  32. min-width="100"
  33. label="Print Side">
  34. </el-table-column>
  35. </el-table-column>
  36. <el-table-column label="色序" header-align="center">
  37. <el-table-column
  38. prop="showOrder"
  39. header-align="center"
  40. align="left"
  41. min-width="100"
  42. label="Color sequence">
  43. </el-table-column>
  44. </el-table-column>
  45. <el-table-column label="颜色参考" header-align="center">
  46. <el-table-column
  47. prop="colorReference"
  48. header-align="center"
  49. align="left"
  50. min-width="105"
  51. label="Color Reference">
  52. </el-table-column>
  53. </el-table-column>
  54. <el-table-column label="油墨代号/颜色IFS No" header-align="center">
  55. <el-table-column
  56. prop="inkCode"
  57. header-align="center"
  58. align="left"
  59. min-width="140"
  60. label="InkCode/Color IFS No">
  61. </el-table-column>
  62. </el-table-column>
  63. <el-table-column label="油墨名称" header-align="center">
  64. <el-table-column
  65. prop="inkDesc"
  66. header-align="center"
  67. align="left"
  68. min-width="200"
  69. label="InkDesc">
  70. </el-table-column>
  71. </el-table-column>
  72. <el-table-column label="颜色匹配" header-align="center">
  73. <el-table-column
  74. prop="colorMatch"
  75. header-align="center"
  76. align="left"
  77. min-width="100"
  78. label="Color Match">
  79. </el-table-column>
  80. </el-table-column>
  81. <el-table-column label="网纹辊/Anilox Grade" header-align="center">
  82. <el-table-column
  83. prop="lpi"
  84. header-align="center"
  85. align="left"
  86. min-width="100"
  87. label="线数(LPI)">
  88. </el-table-column>
  89. <el-table-column
  90. prop="bcm"
  91. header-align="center"
  92. align="left"
  93. min-width="100"
  94. label="容积(BCM)">
  95. </el-table-column>
  96. </el-table-column>
  97. <el-table-column label="印刷速度" header-align="center">
  98. <el-table-column
  99. prop="speed"
  100. header-align="center"
  101. align="left"
  102. min-width="60"
  103. label="Speed">
  104. </el-table-column>
  105. </el-table-column>
  106. <el-table-column label="红外干燥/Infra-Red" header-align="center">
  107. <el-table-column
  108. prop="openFlag"
  109. header-align="center"
  110. align="left"
  111. min-width="100"
  112. label="(ON /OFF)">
  113. </el-table-column>
  114. <el-table-column
  115. prop="resourceNo"
  116. header-align="center"
  117. align="left"
  118. min-width="100"
  119. label="机台">
  120. </el-table-column>
  121. <!-- <el-table-column-->
  122. <!-- prop="gallus"-->
  123. <!-- header-align="center"-->
  124. <!-- align="left"-->
  125. <!-- min-width="100"-->
  126. <!-- label="Gallus(level%)">-->
  127. <!-- </el-table-column>-->
  128. <!-- <el-table-column-->
  129. <!-- prop="markAndy"-->
  130. <!-- header-align="center"-->
  131. <!-- align="left"-->
  132. <!-- min-width="100"-->
  133. <!-- label="MarkAndy(level%)">-->
  134. <!-- </el-table-column>-->
  135. <!-- <el-table-column-->
  136. <!-- prop="hexiang"-->
  137. <!-- header-align="center"-->
  138. <!-- align="left"-->
  139. <!-- min-width="100"-->
  140. <!-- label="Hexiang(L/H)">-->
  141. <!-- </el-table-column>-->
  142. </el-table-column>
  143. <el-table-column label="热覆温度" header-align="center">
  144. <el-table-column
  145. prop="temperature"
  146. header-align="center"
  147. align="left"
  148. min-width="100"
  149. label="temperature">
  150. </el-table-column>
  151. </el-table-column>
  152. <el-table-column label="热覆压力" header-align="center">
  153. <el-table-column
  154. prop="pressure"
  155. header-align="center"
  156. align="left"
  157. min-width="100"
  158. label="Pressure">
  159. </el-table-column>
  160. </el-table-column>
  161. <el-table-column label="备注" header-align="center">
  162. <el-table-column
  163. prop="remark"
  164. header-align="center"
  165. align="left"
  166. min-width="200"
  167. label="Remark">
  168. </el-table-column>
  169. </el-table-column>
  170. </el-table>
  171. <div class="rq-bmPic" >
  172. <img style="max-width: 100%;max-height: 100%;vertical-align:middle;" :src="picUrl">
  173. </div>
  174. </el-form>
  175. <el-dialog append-to-body title="颜色信息" :close-on-click-modal="false" v-drag :visible.sync="colorFlag" width="660px">
  176. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  177. <el-form-item :label="'印刷面/Print Side'">
  178. <el-select v-model="colorData.printSide" style="width: 145px">
  179. <el-option label="Front" value="Front"></el-option>
  180. <el-option label="Back" value="Back"></el-option>
  181. </el-select>
  182. </el-form-item>
  183. <el-form-item :label="'色序/Color sequence'">
  184. <!-- <el-input v-model="colorData.showOrder" type="number" style="width: 145px" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input>-->
  185. <el-input v-model="colorData.showOrder" type="text" style="width: 145px" ></el-input>
  186. </el-form-item>
  187. <el-form-item :label="'颜色参考/Color Reference'">
  188. <el-input v-model="colorData.colorReference" style="width: 145px"></el-input>
  189. </el-form-item>
  190. <el-form-item >
  191. <span slot="label" @click="getBaseList(133,1)" ><a herf="#">油墨代号/颜色IFS No</a></span>
  192. <el-input v-model="colorData.inkCode" style="width: 145px"></el-input>
  193. </el-form-item>
  194. </el-form>
  195. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  196. <el-form-item :label="'颜色匹配/Color Match'">
  197. <el-input v-model="colorData.colorMatch" style="width: 145px" ></el-input>
  198. </el-form-item>
  199. <el-form-item :label="'线数/LPI'">
  200. <el-input v-model="colorData.lpi" style="width: 145px" ></el-input>
  201. </el-form-item>
  202. <el-form-item :label="'容积/BCM'">
  203. <el-input v-model="colorData.bcm" style="width: 145px" ></el-input>
  204. </el-form-item>
  205. <el-form-item :label="'印刷速度/Speed'">
  206. <el-input v-model="colorData.speed" style="width: 145px" ></el-input>
  207. </el-form-item>
  208. </el-form>
  209. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  210. <!-- <el-form-item :label="'Gallus(level%)'">-->
  211. <!-- <el-input v-model="colorData.gallus" style="width: 130px" ></el-input>-->
  212. <!-- </el-form-item>-->
  213. <!-- <el-form-item :label="'MarkAndy(level%)'">-->
  214. <!-- <el-input v-model="colorData.markAndy" style="width: 130px" ></el-input>-->
  215. <!-- </el-form-item>-->
  216. <!-- <el-form-item :label="'Hexiang(L/H)'">-->
  217. <!-- <el-input v-model="colorData.hexiang" style="width: 130px" ></el-input>-->
  218. <!-- </el-form-item>-->
  219. <el-form-item :label="'机台/Machine No.'">
  220. <dict-data-select :site="colorData.site" v-if="colorData.site" v-model="colorData.resourceNo" style="width: 145px" dict-type="bm_printingFlexo_resource"></dict-data-select>
  221. </el-form-item>
  222. <el-form-item :label="'热覆温度/Temperature'">
  223. <el-input v-model="colorData.temperature" style="width: 145px" ></el-input>
  224. </el-form-item>
  225. <el-form-item :label="'红外干燥/Infra-Red(ON /OFF)'">
  226. <el-select v-model="colorData.openFlag" style="width: 145px">
  227. <el-option label="ON" value="ON"></el-option>
  228. <el-option label="OFF" value="OFF"></el-option>
  229. </el-select>
  230. </el-form-item>
  231. </el-form>
  232. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  233. <el-form-item :label="'热覆压力/Pressure'">
  234. <el-input v-model="colorData.pressure" style="width: 145px"></el-input>
  235. </el-form-item>
  236. <el-form-item :label="'备注/Remark'">
  237. <el-input v-model="colorData.remark" style="width: 463px"></el-input>
  238. </el-form-item>
  239. </el-form>
  240. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  241. <el-button type="primary" @click="colorSave()">保存</el-button>
  242. <el-button type="primary" @click="colorFlag = false">取消</el-button>
  243. </el-footer>
  244. </el-dialog>
  245. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  246. </div>
  247. </template>
  248. <script>
  249. import printFlexo from "./com_bm_demoSlot";/*组件*/
  250. import {
  251. searchBMprintFlexoColor,
  252. saveBMprintFlexoColor,
  253. deleteBMprintFlexoColor,
  254. saveBMPrintFlexoColorBatch, // 一键导入
  255. } from "@/api/sampleManagement/technicalSpecificationList.js"
  256. import Chooselist from '@/views/modules/common/Chooselist'
  257. import DictDataSelect from "../../sys/dict-data-select-highlight.vue";
  258. export default {
  259. components: {
  260. DictDataSelect,
  261. Chooselist,printFlexo
  262. },
  263. data() {
  264. return {
  265. searchData: {
  266. site: '',
  267. username: this.$store.state.user.name,
  268. codeNo: '',
  269. buNo:'',
  270. type:'',
  271. },
  272. picUrl:this.$store.state.user.bmPicUrl+'defaultPaperOrientation.png',
  273. ifDisableFlag:false,
  274. colorTable:[],
  275. colorData:{
  276. id:'',
  277. site: '',
  278. codeNo:'',
  279. printSide:'',
  280. order:'',
  281. colorReference:'',
  282. inkCode:'',
  283. colorMatch:'',
  284. lpi:'',
  285. bcm:'',
  286. openFlag:'',
  287. gallus:'',
  288. markAndy:'',
  289. hexiang:'',
  290. temperature:'',
  291. pressure:'',
  292. remark:'',
  293. updateBy:'',
  294. updateDate:'',
  295. resourceNo: '',
  296. speed: '',
  297. showOrder: null
  298. },
  299. colorFlag:false,
  300. }
  301. },
  302. methods: {
  303. // 获取基础数据列表S
  304. getBaseList (val, type) {
  305. this.tagNo = val
  306. this.tagNo1 = type
  307. this.$nextTick(() => {
  308. let strVal = ''
  309. if (val === 133) {
  310. if(type==1) {
  311. strVal = this.colorData.inkCode
  312. }
  313. }
  314. this.$refs.baseList.init(val, strVal)
  315. })
  316. },
  317. /* 列表方法的回调 */
  318. getBaseData (val) {
  319. if (this.tagNo === 133) {
  320. if(this.tagNo1==1) {
  321. this.colorData.inkCode = val.part_no
  322. }
  323. }
  324. },
  325. //初始化组件的参数
  326. init (inData) {
  327. if (this.searchData.codeNo != null && this.searchData.codeNo !== '') {
  328. return false;
  329. }
  330. //初始化参数
  331. this.searchData = JSON.parse(JSON.stringify(inData))
  332. // if (this.searchData.ifDisableFlag) {
  333. // this.ifDisableFlag = true
  334. // }
  335. //刷新表格
  336. this.searchTable()
  337. this.colorSearch()
  338. //刷新表格
  339. this.searchData.type = 'printFlexo'
  340. this.$refs.printFlexo.init(JSON.parse(JSON.stringify(this.searchData)))
  341. },
  342. searchTable () {
  343. },
  344. newColor () {
  345. if (this.searchData.codeNo === '') {
  346. this.$message.success('数据错误,请关闭页面重试!')
  347. return false;
  348. }
  349. let number = 1
  350. for (let i = 0; i <this.colorTable.length ; i++) {
  351. if (number <= this.colorTable[i].showOrder) {
  352. number = Number(this.colorTable[i].showOrder) + 1
  353. }
  354. }
  355. this.colorData = {
  356. id: 0,
  357. site: this.searchData.site,
  358. codeNo: this.searchData.codeNo,
  359. order: number,
  360. printSide: 'front',
  361. colorReference: '',
  362. inkCode: '',
  363. colorMatch: '',
  364. lpi: '',
  365. bcm: '',
  366. openFlag: '',
  367. gallus: '',
  368. markAndy: '',
  369. hexiang: '',
  370. temperature: '',
  371. pressure: '',
  372. remark: '',
  373. updateBy: '',
  374. updateDate: '',
  375. resourceNo: '',
  376. speed: '',
  377. showOrder: null
  378. }
  379. this.colorFlag = true
  380. },
  381. updateColor (row) {
  382. this.colorData = JSON.parse(JSON.stringify(row))
  383. this.colorFlag = true
  384. },
  385. colorSearch (type) {
  386. searchBMprintFlexoColor(this.searchData).then(({data}) => {
  387. this.colorTable = data.rows
  388. if (type) {
  389. this.$message.success( '操作成功')
  390. }
  391. })
  392. },
  393. colorSave () {
  394. this.$confirm("是否保存信息?", '保存提示', {
  395. confirmButtonText: '确定',
  396. cancelButtonText: '取消',
  397. }).then(() => {
  398. saveBMprintFlexoColor(this.colorData).then(({data}) => {
  399. if (data && data.code === 0) {
  400. this.colorSearch()
  401. this.colorFlag = false
  402. this.$message.success( '操作成功')
  403. } else {
  404. this.$message.error(data.msg)
  405. }
  406. })
  407. })
  408. },
  409. // 一键导入
  410. colorSaveBatch () {
  411. this.$confirm("此操作将清空已填写的数据,是否继续?", '保存提示', {
  412. confirmButtonText: '确定',
  413. cancelButtonText: '取消',
  414. }).then(() => {
  415. let tempData = {
  416. site: this.searchData.site,
  417. codeNo: this.searchData.codeNo,
  418. printSide: 'front',
  419. }
  420. saveBMPrintFlexoColorBatch(tempData).then(({data}) => {
  421. if (data && data.code === 0) {
  422. this.colorSearch()
  423. this.$message.success( '操作成功')
  424. } else {
  425. this.$message.error(data.msg)
  426. }
  427. })
  428. })
  429. },
  430. deleteColor (row) {
  431. this.$confirm(`是否删除这条信息?`, '提示', {
  432. confirmButtonText: '确定',
  433. cancelButtonText: '取消',
  434. type: 'warning'
  435. }).then(() => {
  436. deleteBMprintFlexoColor(row).then(({data}) => {
  437. if (data && data.code === 0) {
  438. this.colorSearch()
  439. this.$message({
  440. message: '操作成功',
  441. type: 'success',
  442. duration: 1500,
  443. onClose: () => {}
  444. })
  445. } else {
  446. this.$alert(data.msg, '错误', {
  447. confirmButtonText: '确定'
  448. })
  449. }
  450. })
  451. })
  452. },
  453. },
  454. }
  455. </script>
  456. <style scoped>
  457. </style>