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.

2049 lines
69 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <fieldset class="customer-field" style="width: 100%; padding: 0.35em 0.75em 0.425em;">
  4. <el-row>
  5. <el-col :span="24">
  6. <el-button @click="initToolHeaderModel('Y')" :disabled = "authAdd" type="primary">{{ buttons.new }}</el-button>
  7. <el-button @click="initToolHeaderModel('N')" :disabled = "authEdit" type="primary">{{ buttons.edit }}</el-button>
  8. <el-button @click="deleteToolHeader()" :disabled = "authDelete" type="primary">{{ buttons.delete }}</el-button>
  9. </el-col>
  10. </el-row>
  11. <el-row>
  12. <el-col :span="24">
  13. <el-form :inline="true" label-position="top" label-width="100px">
  14. <el-form-item>
  15. <el-link slot="label" @click="getBaseList(70)"> {{labels.headerInputLabel1}}</el-link>
  16. <el-input style="width: 100px;"
  17. @keyup.enter.native="getHeaderData"
  18. v-model="headerData.toolId"></el-input> <!---->
  19. </el-form-item>
  20. <el-form-item :label="labels.headerInputLabel2">
  21. <el-input style="width: 100px;" readonly v-model="headerData.toolDescription"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="labels.headerInputLabel3">
  24. <el-input style="width: 100px;" readonly v-model="headerData.spec"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="labels.headerInputLabel4">
  27. <el-input style="width: 100px;" readonly v-model="headerData.site"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="labels.headerInputLabel5">
  30. <el-input style="width: 100px;" readonly v-model="headerData.familyId"></el-input>
  31. </el-form-item>
  32. <el-form-item :label="labels.headerInputLabel6">
  33. <el-input style="width: 100px;" readonly v-model="headerData.familyName"></el-input>
  34. </el-form-item>
  35. <el-form-item :label="labels.headerInputLabel7">
  36. <el-input style="width: 100px;" readonly v-model="headerData.umid"></el-input>
  37. </el-form-item>
  38. <el-form-item :label="labels.headerInputLabel8">
  39. <el-input style="width: 100px;" readonly v-model="headerData.strActive"></el-input>
  40. </el-form-item>
  41. </el-form>
  42. </el-col>
  43. </el-row>
  44. <el-row>
  45. <el-col :span="24">
  46. <el-form :inline="true" label-position="top" label-width="100px">
  47. <el-form-item :label="labels.headerInputLabel9">
  48. <el-input style="width: 100px;" readonly v-model="headerData.codeNo"></el-input>
  49. </el-form-item>
  50. <el-form-item :label="labels.headerInputLabel10">
  51. <el-input style="width: 100px;" readonly v-model="headerData.defaultLocationId"></el-input>
  52. </el-form-item>
  53. <el-form-item :label="labels.headerInputLabel11">
  54. <el-input style="width: 100px;" readonly v-model="headerData.strPartCreated"></el-input>
  55. </el-form-item>
  56. <el-form-item :label="labels.headerInputLabel12">
  57. <el-input style="width: 100px;" readonly v-model="headerData.partNo"></el-input>
  58. </el-form-item>
  59. <el-form-item :label="labels.headerInputLabel14">
  60. <el-input style="width: 100px;" readonly v-model="headerData.strCreateDate"></el-input>
  61. </el-form-item>
  62. <el-form-item :label="labels.headerInputLabel15">
  63. <el-input style="width: 100px;" readonly v-model="headerData.createdBy"></el-input>
  64. </el-form-item>
  65. <el-form-item :label="labels.headerInputLabel13">
  66. <el-input style="width: 215px;" readonly v-model="headerData.remark"></el-input>
  67. </el-form-item>
  68. </el-form>
  69. </el-col>
  70. </el-row>
  71. </fieldset>
  72. <el-tabs @tab-click="selectTabs" style="font-size: 12px" class="customer-tab" v-model="activeName"
  73. type="border-card">
  74. <el-tab-pane :label="labels.tool" name="toolInfo">
  75. <el-row>
  76. <el-col :span="7">
  77. <fieldset class="customer-field" style="width: 98%;">
  78. <legend>{{labels.dataInfo}}</legend>
  79. <el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;">
  80. <el-form-item>
  81. <el-button @click="initToolModel('Y')" :disabled = "authAdd" type="primary">{{ buttons.new2 }}</el-button>
  82. <el-button @click="initToolModel('N')" :disabled = "authEdit" type="primary">{{ buttons.edit }}</el-button>
  83. <el-button @click="printMethod('Y')" type="primary">{{ buttons.toolPrint }}</el-button>
  84. <el-button @click="printMethod('N')" type="primary">{{ buttons.toolPrint2 }}</el-button>
  85. </el-form-item>
  86. </el-form>
  87. <el-form :inline="true" label-position="top" label-width="95px">
  88. <el-row>
  89. <el-col :span="12">
  90. <el-form-item :label="labels.leftInputLabel1">
  91. <el-select @change="toolInstanceIdChange(currentDetailData.toolInstanceId)"
  92. v-model="currentDetailData.toolInstanceId" :placeholder="labels.placeholder" style="width: 150px;">
  93. <el-option
  94. v-for="item in selectList.select4"
  95. :key="item.value"
  96. :label="item.label"
  97. :value="item.value">
  98. </el-option>
  99. </el-select>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="12">
  103. <el-form-item :label="labels.leftInputLabel2">
  104. <el-input style="width: 150px;" readonly v-model="currentDetailData.status"></el-input>
  105. </el-form-item>
  106. </el-col>
  107. </el-row>
  108. <el-row>
  109. <el-col :span="12">
  110. <el-form-item :label="labels.leftInputLabel3">
  111. <el-input style="width: 150px;" readonly v-model="currentDetailData.supplierId"></el-input>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="12">
  115. <el-form-item :label="labels.leftInputLabel4">
  116. <el-input style="width: 150px;" readonly v-model="currentDetailData.supplierName"></el-input>
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <el-row>
  121. <el-col :span="12">
  122. <el-form-item :label="labels.leftInputLabel5">
  123. <el-input style="width: 150px;" readonly v-model="currentDetailData.strPurchaseDate"></el-input>
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="12">
  127. <el-form-item :label="labels.leftInputLabel6">
  128. <el-input style="width: 150px;" readonly v-model="currentDetailData.steelSeal"></el-input>
  129. </el-form-item>
  130. </el-col>
  131. </el-row>
  132. <el-row>
  133. <el-col :span="12">
  134. <el-form-item :label="labels.leftInputLabel7">
  135. <el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseInDate"></el-input>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="12">
  139. <el-form-item :label="labels.leftInputLabel8">
  140. <el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseOutDate"></el-input>
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. <el-row>
  145. <el-col :span="12">
  146. <el-form-item :label="labels.leftInputLabel9">
  147. <el-input style="width: 150px;" readonly v-model="currentDetailData.estUseQty"></el-input>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="12">
  151. <el-form-item :label="labels.leftInputLabel10">
  152. <el-input style="width: 150px;" readonly v-model="currentDetailData.actualUseQty"></el-input>
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. <el-row>
  157. <el-col :span="12">
  158. <el-form-item :label="labels.leftInputLabel11">
  159. <el-input style="width: 150px;" readonly v-model="currentDetailData.strCreateDate"></el-input>
  160. </el-form-item>
  161. </el-col>
  162. <el-col :span="12">
  163. <el-form-item :label="labels.leftInputLabel12">
  164. <el-input style="width: 150px;" readonly v-model="currentDetailData.createdBy"></el-input>
  165. </el-form-item>
  166. </el-col>
  167. </el-row>
  168. <el-row>
  169. <el-col :span="12">
  170. <el-form-item :label="labels.leftInputLabel13">
  171. <el-input style="width: 150px;" readonly v-model="currentDetailData.orderNo"></el-input>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="12">
  175. <el-form-item :label="labels.locationId">
  176. <el-input style="width: 150px;" readonly v-model="currentDetailData.locationId"></el-input>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. <el-row>
  181. <el-col :span="24">
  182. <el-form-item :label="labels.leftInputLabel14">
  183. <el-input style="width: 300px;" readonly v-model="currentDetailData.remark"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. </el-row>
  187. </el-form>
  188. </fieldset>
  189. </el-col>
  190. <el-col :span="17">
  191. <fieldset class="customer-field" style="width: 100%; ">
  192. <legend>{{labels.rightInputLabel1}}</legend>
  193. <el-table
  194. width="100%"
  195. :height="height/2"
  196. :data="sfdcToolingHistList"
  197. border
  198. v-loading="dataListLoading"
  199. @selection-change="selectionChangeHandle"
  200. style="width: 100%;">
  201. <el-table-column
  202. v-for="(item,index) in columnList" :key="index"
  203. :sortable="item.columnSortable"
  204. :prop="item.columnProp"
  205. :header-align="item.headerAlign"
  206. :show-overflow-tooltip="item.showOverflowTooltip"
  207. :align="item.align"
  208. :fixed="item.fixed==''?false:item.fixed"
  209. :width="item.columnWidth"
  210. :label="item.columnLabel">
  211. <template slot-scope="scope">
  212. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  213. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  214. style="width: 100px; height: 80px"/></span>
  215. </template>
  216. </el-table-column>
  217. </el-table>
  218. </fieldset>
  219. <fieldset class="customer-field" style="width: 100%; ">
  220. <legend>{{labels.rightInputLabel2}}</legend>
  221. <el-table
  222. width="100%"
  223. :height="height/2"
  224. :data="toolInstanceIdUseHist"
  225. border
  226. v-loading="dataListLoading"
  227. @selection-change="selectionChangeHandle"
  228. style="width: 100%;">
  229. <el-table-column
  230. v-for="(item,index) in columnList1" :key="index"
  231. :sortable="item.columnSortable"
  232. :prop="item.columnProp"
  233. :header-align="item.headerAlign"
  234. :show-overflow-tooltip="item.showOverflowTooltip"
  235. :align="item.align"
  236. :fixed="item.fixed==''?false:item.fixed"
  237. :width="item.columnWidth"
  238. :label="item.columnLabel">
  239. <template slot-scope="scope">
  240. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  241. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  242. style="width: 100px; height: 80px"/></span>
  243. </template>
  244. </el-table-column>
  245. </el-table>
  246. </fieldset>
  247. </el-col>
  248. </el-row>
  249. </el-tab-pane>
  250. <el-tab-pane :label="labels.productlist" name="tool">
  251. <el-table
  252. width="100%"
  253. :height="height+50"
  254. :data="toolRouteDataList"
  255. border
  256. v-loading="dataListLoading"
  257. @selection-change="selectionChangeHandle"
  258. style="width: 100%;">
  259. <el-table-column
  260. v-for="(item,index) in routeToolList" :key="index"
  261. :sortable="item.columnSortable"
  262. :prop="item.columnProp"
  263. :header-align="item.headerAlign"
  264. :show-overflow-tooltip="item.showOverflowTooltip"
  265. :align="item.align"
  266. :fixed="item.fixed==''?false:item.fixed"
  267. :min-width="item.columnWidth"
  268. :label="item.columnLabel">
  269. <template slot-scope="scope">
  270. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  271. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  272. style="width: 100px; height: 80px"/></span>
  273. </template>
  274. </el-table-column>
  275. </el-table>
  276. </el-tab-pane>
  277. </el-tabs>
  278. <column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
  279. <!--新增或编辑 工具信息-->
  280. <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
  281. :title="labels.toolInfo" :visible.sync="toolHeaderShow" width="473px">
  282. <el-form :inline="true" label-position="top" label-width="100px">
  283. <el-form-item :label="labels.headerInputLabel1">
  284. <el-input style="width: 100px;" :readonly="!this.toolDetailAddOrEdit"
  285. v-model="editHeaderData.toolId"></el-input>
  286. </el-form-item>
  287. <el-form-item :label="labels.headerInputLabel2">
  288. <el-input style="width: 100px;" v-model="editHeaderData.toolDescription"></el-input>
  289. </el-form-item>
  290. <el-form-item :label="labels.headerInputLabel3">
  291. <el-input style="width: 100px;" v-model="editHeaderData.spec"></el-input>
  292. </el-form-item>
  293. <el-form-item>
  294. <el-link slot="label" @click="getBaseList(23)"> {{labels.headerInputLabel5}}</el-link>
  295. <el-input style="width: 100px;" v-model="editHeaderData.familyId"></el-input>
  296. </el-form-item>
  297. <el-form-item :label="labels.headerInputLabel6">
  298. <el-input style="width: 100px;" class="customer-input-color-red" readonly
  299. v-model="editHeaderData.familyName"></el-input>
  300. </el-form-item>
  301. <el-form-item>
  302. <el-link slot="label" @click="getBaseList(7)"> {{labels.headerInputLabel7}}</el-link>
  303. <el-input style="width: 100px;" readonly v-model="editHeaderData.umid"></el-input>
  304. </el-form-item>
  305. <el-form-item :label="labels.headerInputLabel9">
  306. <el-input style="width: 100px;" v-model="editHeaderData.codeNo"></el-input>
  307. </el-form-item>
  308. <el-form-item :label="labels.headerInputLabel8">
  309. <el-checkbox style="width: 100px;" v-model="editHeaderData.active"></el-checkbox>
  310. </el-form-item>
  311. <el-form-item :label="labels.headerInputLabel10">
  312. <el-input style="width: 100px;" v-model="editHeaderData.defaultLocationId"></el-input>
  313. </el-form-item>
  314. <el-form-item :label="labels.headerInputLabel13">
  315. <el-input style="width: 215px;" v-model="editHeaderData.remark"></el-input>
  316. </el-form-item>
  317. <el-form-item :label="labels.headerInputLabel11">
  318. <el-checkbox style="width: 100px;" v-model="editHeaderData.strPartCreated"></el-checkbox>
  319. </el-form-item>
  320. </el-form>
  321. <span slot="footer" class="dialog-footer">
  322. <el-button type="primary" @click="saveAndUpdateToolHeader()">{{buttons.true}}</el-button>
  323. <el-button type="primary" @click="toolHeaderShow = false">{{buttons.cancel}}</el-button>
  324. </span>
  325. </el-dialog>
  326. <!--新增或编辑实例-->
  327. <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
  328. :title="labels.leftInputLabel15" :visible.sync="setUp.toolEditFlag" width="736px">
  329. <el-form :inline="true" label-position="top">
  330. <el-form-item :label="labels.leftInputLabel1">
  331. <el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.toolInstanceId"></el-input>
  332. </el-form-item>
  333. <el-form-item :label="labels.leftInputLabel2">
  334. <el-select style="width: 130px;" v-model="editData.status">
  335. <el-option :label="labels.tip1" value="未投用"></el-option>
  336. <el-option :label="labels.tip2" value="已投用"></el-option>
  337. <el-option :label="labels.tip3" value="停用"></el-option>
  338. </el-select>
  339. <!-- <el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.status"></el-input>-->
  340. </el-form-item>
  341. <el-form-item>
  342. <span slot="label" @click="getBaseList(3)"><el-link>{{labels.supplierId}}</el-link> </span>
  343. <el-input style="width: 130px;" v-model="editData.supplierId"></el-input>
  344. </el-form-item>
  345. <el-form-item :label="labels.leftInputLabel4">
  346. <el-input style="width: 274px;" class="customer-input-color-red" readonly
  347. v-model="editData.supplierName"></el-input>
  348. </el-form-item>
  349. <el-form-item :label="labels.leftInputLabel5" style="height: 28px;">
  350. <el-date-picker
  351. v-model="editData.strPurchaseDate"
  352. value-format='yyyy-MM-dd'
  353. format='yyyy-MM-dd'
  354. :placeholder="labels.placeholder"
  355. style="width: 130px;">
  356. </el-date-picker>
  357. </el-form-item>
  358. <el-form-item :label="labels.leftInputLabel6">
  359. <el-input style="width: 130px;" v-model="editData.steelSeal"></el-input>
  360. </el-form-item>
  361. <el-form-item :label="labels.leftInputLabel7">
  362. <el-date-picker
  363. v-model="editData.strPhaseInDate"
  364. value-format='yyyy-MM-dd '
  365. format='yyyy-MM-dd'
  366. :placeholder="labels.placeholder"
  367. style="width: 130px;">
  368. </el-date-picker>
  369. </el-form-item>
  370. <el-form-item :label="labels.leftInputLabel8">
  371. <el-date-picker
  372. v-model="editData.strPhaseOutDate"
  373. :placeholder="labels.placeholder"
  374. value-format='yyyy-MM-dd'
  375. format='yyyy-MM-dd'
  376. style="width: 130px;">
  377. </el-date-picker>
  378. </el-form-item>
  379. <el-form-item :label="labels.leftInputLabel9">
  380. <el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;"
  381. v-model="editData.estUseQty"></el-input>
  382. </el-form-item>
  383. <el-form-item :label="labels.leftInputLabel10">
  384. <el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;"
  385. v-model="editData.actualUseQty"></el-input>
  386. </el-form-item>
  387. <el-form-item :label="labels.locationId">
  388. <el-input style="width: 130px;" v-model="editData.locationId"></el-input>
  389. </el-form-item>
  390. <el-form-item :label="labels.leftInputLabel14">
  391. <el-input style="width: 418px;" v-model="editData.remark"></el-input>
  392. </el-form-item>
  393. </el-form>
  394. <span slot="footer" class="dialog-footer">
  395. <el-button type="primary" @click="saveAndUpdateToolDetail()">{{buttons.true}}</el-button>
  396. <el-button type="primary" @click="setUp.toolEditFlag = false">{{buttons.cancel}}</el-button>
  397. </span>
  398. </el-dialog>
  399. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  400. </div>
  401. </template>
  402. <script>
  403. import Chooselist from '@/views/modules/common/Chooselist'
  404. import column from "../common/column";
  405. import {
  406. searchSysLanguagePackList,
  407. searchSysLanguageParam,
  408. searchFunctionButtonList,
  409. saveButtonList,
  410. searchSysLanguage,
  411. searchLanguageListByLanguageCode,
  412. saveSysLanguageOne
  413. } from "@/api/sysLanguage.js"
  414. import getLodop from '@/utils/LodopFuncs.js'
  415. import {
  416. saveTableDefaultList,
  417. saveTableUser,
  418. getTableDefaultListLanguage,
  419. getTableUserListLanguage,
  420. removerDefault,
  421. removerUser
  422. } from "@/api/table.js"
  423. import {
  424. userFavoriteList,
  425. saveUserFavorite,
  426. removeUserFavorite,
  427. } from '@/api/userFavorite.js'
  428. import {
  429. getToolHeaderData,
  430. getToolDetailList,
  431. getToolInstanceIdUseHist,
  432. getSfdcToolingHistList,
  433. getToolHeaderList,
  434. updateToolDetail,
  435. saveToolInfoDetail,
  436. editToolHeader,
  437. saveToolHeader,
  438. deleteToolHeader
  439. } from '@/api/knifemold/tool-info.js'
  440. import {
  441. printToolData
  442. } from "@/api/knifemold/receive.js"
  443. import {
  444. searchProcessRouteTool,
  445. } from "@/api/base/productProcessRoute.js"
  446. var functionId='106001003';
  447. export default {
  448. components: {
  449. column,
  450. Chooselist
  451. },
  452. data() {
  453. return {
  454. authEdit: false,
  455. authAdd: false,
  456. authDelete: false,
  457. jumpFlag:true,
  458. menuId: this.$route.meta.menuId,
  459. labels: {
  460. tip1: '未投用',
  461. tip2: '已投用',
  462. tip3: '停用',
  463. headerInputLabel1: '工具编码',
  464. headerInputLabel2: '工具名称',
  465. headerInputLabel3: '规格型号',
  466. headerInputLabel4: '工厂编号',
  467. headerInputLabel5: '工具分类',
  468. headerInputLabel6: '工具分类名称',
  469. headerInputLabel7: '计量单位',
  470. headerInputLabel8: '在用',
  471. headerInputLabel9: '属性模块',
  472. headerInputLabel10: '默认库位',
  473. headerInputLabel11: '创建物料编码',
  474. headerInputLabel12: '物料编码',
  475. headerInputLabel13: '说明',
  476. headerInputLabel14: '新增日期',
  477. headerInputLabel15: '录入人',
  478. leftInputLabel1: '实例编码',
  479. leftInputLabel2: '状态',
  480. leftInputLabel3: '供应商编码',
  481. leftInputLabel4: '供应商名称',
  482. leftInputLabel5: '采购日期',
  483. leftInputLabel6: '钢印编码',
  484. leftInputLabel7: '入库日期',
  485. leftInputLabel8: '终止日期',
  486. leftInputLabel9: '预计刀模寿命',
  487. leftInputLabel10: '使用寿命',
  488. leftInputLabel11: '录入日期',
  489. leftInputLabel12: '录入人',
  490. leftInputLabel13: '采购订单号',
  491. leftInputLabel14: '备注',
  492. leftInputLabel15: '工具实例信息',
  493. rightInputLabel1: '工具使用记录:',
  494. rightInputLabel2: '工具维修记录:',
  495. tool:'工具实例',
  496. dataInfo:'数据明细/编辑',
  497. placeholder:'请选择',
  498. locationId:'库位编码',
  499. productlist:'使用该工具的产品清单',
  500. toolInfo:'工具信息',
  501. supplierId:'供应商编码',
  502. placeholder2:'选择日期',
  503. point:'提示',
  504. true:'确定',
  505. cancel:'取消',
  506. deleteAsk:'确定进行删除操作?',
  507. toolInstanceIdIn:'请选择工具信息!',
  508. warning1:'预计使用寿命必须大于0',
  509. toolIdIn:'工具编号不能为空,请选择',
  510. familyIdIn:'工具分类不能为空,请选择',
  511. umidIn:'计量单位不能为空,请选择',
  512. cancelAsk:'是否取消收藏?',
  513. },
  514. buttons: {
  515. add: '添加',
  516. edit: '编辑',
  517. delete: '删除',
  518. deleteList: '批量删除',
  519. cz: '操作',
  520. search: '查询',
  521. download: '导出',
  522. new:'新增',
  523. new2:'新建',
  524. toolPrint:'工具标签',
  525. toolPrint2:'网版',
  526. true:'确定',
  527. cancel:'取消',
  528. },
  529. queryButton: {
  530. functionId: functionId,
  531. table_id: '*',
  532. languageCode: this.$i18n.locale,
  533. objectType: 'button'
  534. },
  535. queryLabel: {
  536. functionId: functionId,
  537. table_id: '*',
  538. languageCode: this.$i18n.locale,
  539. objectType: 'label'
  540. },
  541. activeName: 'toolInfo',
  542. toolHeaderShow: false,
  543. toolHeaderAddOrEdit: false,
  544. toolDetailAddOrEdit: false,
  545. toolHeaderList: [],
  546. queryHeaderData: {
  547. site: this.$store.state.user.site,
  548. toolId: '',
  549. toolDescription: ''
  550. },
  551. editData: {
  552. actualUseQty: 0,
  553. createDate: "",
  554. createdBy: this.$store.state.user.name,
  555. description: null,
  556. estUseQty: 0,
  557. inspectDuration: null,
  558. lastUpdateBy: null,
  559. latestInspectDate: null,
  560. latestUseDate: null,
  561. locationId: null,
  562. phaseInDate: "",
  563. phaseOutDate: "",
  564. purchaseDate: "",
  565. remark: "",
  566. site: this.$store.state.user.site,
  567. status: "",
  568. statusRef: null,
  569. steelSeal: null,
  570. strCreateDate: "",
  571. strLatestInspectDate: null,
  572. strLatestUseDate: null,
  573. strPhaseInDate: "",
  574. strPhaseOutDate: "",
  575. strPurchaseDate: "",
  576. supplierId: "",
  577. supplierName: "",
  578. toolDescription: null,
  579. toolId: "",
  580. toolIndex: null,
  581. toolInstanceId: "",
  582. torNumacc: null,
  583. torNumdown: null,
  584. workCenterNo: null,
  585. },
  586. setUp: {
  587. toolEditFlag: false,
  588. saveToolFlag: false,
  589. toolHeaderFlag: false,
  590. },
  591. toolInstanceIdUseHist: [],
  592. sfdcToolingHistList: [],
  593. selectList: {
  594. select1: [{
  595. value: 'Y',
  596. label: '启用'
  597. }, {
  598. value: 'N',
  599. label: '禁用'
  600. }],
  601. select2: [{
  602. value: 'Y',
  603. label: '是'
  604. }, {
  605. value: 'N',
  606. label: '否'
  607. }],
  608. select3: [{
  609. value: 'P',
  610. label: '个人'
  611. }, {
  612. value: 'G',
  613. label: '组'
  614. }],
  615. select4: [],
  616. select5: [],
  617. },
  618. currentDetailData: {
  619. actualUseQty: '',
  620. createDate: '',
  621. createdBy: '',
  622. description: '',
  623. estUseQty: '',
  624. inspectDuration: '',
  625. lastUpdateBy: '',
  626. latestInspectDate: '',
  627. latestUseDate: '',
  628. locationId: '',
  629. phaseInDate: '',
  630. phaseOutDate: '',
  631. purchaseDate: '',
  632. remark: '',
  633. site: '',
  634. status: '',
  635. statusRef: '',
  636. supplierId: '',
  637. supplierName: '',
  638. toolDescription: '',
  639. toolId: '',
  640. toolIndex: '',
  641. toolInstanceId: '',
  642. torNumacc: '',
  643. torNumdown: '',
  644. workCenterNo: '',
  645. steelSeal: '',
  646. strCreateDate: '',
  647. strLatestInspectDate: '',
  648. strLatestUseDate: '',
  649. strPhaseInDate: '',
  650. strPhaseOutDate: '',
  651. strPurchaseDate: '',
  652. },
  653. detailList: [],
  654. headerData: {
  655. active: "",
  656. codeNo: null,
  657. createDate: "",
  658. createdBy: "",
  659. defaultLocationId: null,
  660. defaultWarehouseId: null,
  661. familyId: null,
  662. familyName: null,
  663. lastUpdateBy: null,
  664. partCreatedFlag: null,
  665. partNo: null,
  666. remark: null,
  667. site: this.$store.state.user.site,
  668. spec: null,
  669. standardCost: null,
  670. strActive: "",
  671. strCreateDate: "",
  672. strPartCreated: "",
  673. toolDescription: "",
  674. toolId: "",
  675. umid: null
  676. },
  677. editHeaderData: {
  678. active: "",
  679. codeNo: null,
  680. createDate: "",
  681. createdBy: "",
  682. defaultLocationId: null,
  683. defaultWarehouseId: null,
  684. familyId: null,
  685. familyName: null,
  686. lastUpdateBy: null,
  687. partCreatedFlag: null,
  688. partNo: null,
  689. remark: null,
  690. site: this.$store.state.user.site,
  691. spec: null,
  692. standardCost: null,
  693. strActive: "",
  694. strCreateDate: "",
  695. strPartCreated: "",
  696. toolDescription: "",
  697. toolId: "",
  698. umid: null
  699. },
  700. site: this.$store.state.user.site,
  701. // table高度
  702. height: 450,
  703. // 是否收藏
  704. favorite: false,
  705. addLanguage: false,
  706. functionId: 106001003,
  707. tableId: "toolInfo106001003",
  708. value1: true,
  709. visible: false,
  710. showDefault: false,
  711. // 默认table 查询参数
  712. queryTable: {
  713. functionId: 106001003,
  714. tableId: "toolInfo106001003",
  715. languageCode: this.$i18n.locale
  716. },
  717. // 用户table 查询参数
  718. queryTableUser: {
  719. userId: this.$store.state.user.name,
  720. functionId: 106001003,
  721. tableId: "toolInfo106001003",
  722. status: true,
  723. languageCode: this.$i18n.locale
  724. },
  725. // 语言词典查询参数
  726. querySysLanguageParam: {
  727. languageCode: this.$i18n.locale
  728. },
  729. // 语言词典集合
  730. sysLanguageParams: [],
  731. // 用户table 配置集合
  732. userColumnList: [],
  733. // 展示列集
  734. columnList: [
  735. {
  736. userId: this.$store.state.user.name,
  737. functionId: 106001003,
  738. serialNumber: 'toolUseHist106001003OrderNo',
  739. tableId: "toolUseHist106001003",
  740. tableName: "工具使用记录",
  741. columnProp: "orderNo",
  742. headerAlign: "center",
  743. align: "center",
  744. columnLabel: "生产订单号",
  745. columnHidden: false,
  746. columnImage: false,
  747. columnSortable: true,
  748. sortLv: 0,
  749. status: true,
  750. fixed: false
  751. },
  752. {
  753. userId: this.$store.state.user.name,
  754. functionId: 106001003,
  755. serialNumber: 'toolUseHist106001003FinishQty',
  756. tableId: "toolUseHist106001003",
  757. tableName: "工具使用记录",
  758. columnProp: "finishQty",
  759. headerAlign: "center",
  760. align: "center",
  761. columnLabel: "使用寿命",
  762. columnHidden: false,
  763. columnImage: false,
  764. columnSortable: true,
  765. sortLv: 0,
  766. status: true,
  767. fixed: '',
  768. },
  769. {
  770. userId: this.$store.state.user.name,
  771. functionId: 106001003,
  772. serialNumber: 'toolUseHist106001003OStrReportDate',
  773. tableId: "toolUseHist106001003",
  774. tableName: "工具使用记录",
  775. columnProp: "strReportDate",
  776. headerAlign: "center",
  777. align: "center",
  778. columnLabel: "录入日期",
  779. columnHidden: false,
  780. columnImage: false,
  781. columnSortable: true,
  782. sortLv: 0,
  783. status: true,
  784. fixed: '',
  785. },
  786. {
  787. userId: this.$store.state.user.name,
  788. functionId: 106001003,
  789. serialNumber: 'toolUseHist106001003Reportedby',
  790. tableId: "toolUseHist106001003",
  791. tableName: "工具使用记录",
  792. columnProp: "reportedby",
  793. headerAlign: "center",
  794. align: "center",
  795. columnLabel: "录入人",
  796. columnHidden: false,
  797. columnImage: false,
  798. columnSortable: true,
  799. sortLv: 0,
  800. status: true,
  801. fixed: '',
  802. }
  803. ],
  804. // 展示列集
  805. columnList1: [
  806. {
  807. userId: this.$store.state.user.name,
  808. functionId: 106001003,
  809. tableId: "service106001003",
  810. serialNumber: '106001003Table2strDeliveryDate',
  811. tableName: "工具维修记录",
  812. columnProp: "strDeliveryDate",
  813. headerAlign: "center",
  814. align: "center",
  815. columnLabel: "送修日期",
  816. columnHidden: false,
  817. columnImage: false,
  818. columnSortable: true,
  819. sortLv: 0,
  820. status: true,
  821. fixed: false
  822. },
  823. {
  824. userId: this.$store.state.user.name,
  825. functionId: 106001003,
  826. tableId: "service106001003",
  827. serialNumber: '106001003Table2supplierName',
  828. tableName: "工具维修记录",
  829. columnProp: "supplierName",
  830. headerAlign: "center",
  831. align: "center",
  832. columnLabel: "供应商",
  833. columnHidden: false,
  834. columnImage: false,
  835. columnSortable: true,
  836. sortLv: 0,
  837. status: true,
  838. fixed: '',
  839. },
  840. {
  841. userId: this.$store.state.user.name,
  842. functionId: 106001003,
  843. tableId: "service106001003",
  844. serialNumber: '106001003Table2strReturnDate',
  845. tableName: "工具维修记录",
  846. columnProp: "strReturnDate",
  847. headerAlign: "center",
  848. align: "center",
  849. columnLabel: "返回日期",
  850. columnHidden: false,
  851. columnImage: false,
  852. columnSortable: true,
  853. sortLv: 0,
  854. status: true,
  855. fixed: '',
  856. },
  857. {
  858. userId: this.$store.state.user.name,
  859. functionId: 106001003,
  860. tableId: "service106001003",
  861. serialNumber: '106001003Table2createdBy',
  862. tableName: "工具维修记录",
  863. columnProp: "createdBy",
  864. headerAlign: "center",
  865. align: "center",
  866. columnLabel: "接收人",
  867. columnHidden: false,
  868. columnImage: false,
  869. columnSortable: true,
  870. sortLv: 0,
  871. status: true,
  872. fixed: '',
  873. },
  874. // {
  875. // userId: this.$store.state.user.name,
  876. // functionId: 106001003,
  877. // tableId: "common1002",
  878. // tableName: "commonLanguage",
  879. // columnProp: "languageCode",
  880. // headerAlign: "center",
  881. // align: "center",
  882. // columnLabel: "语言编码",
  883. // columnHidden: false,
  884. // columnImage: false,
  885. // columnSortable: true,
  886. // sortLv: 0,
  887. // status: true,
  888. // fixed: '',
  889. // }
  890. ],
  891. // 工具显示列表
  892. toolRouteDataList: [],
  893. // 工具使用清单
  894. routeToolList: [
  895. {
  896. userId: this.$store.state.user.name,
  897. functionId: 106001003,
  898. serialNumber: '106001003Table3PartNo',
  899. tableId: "106001003Table3",
  900. tableName: "工具使用清单",
  901. columnProp: "partNo",
  902. headerAlign: "center",
  903. align: "left",
  904. columnLabel: "产品编码",
  905. columnHidden: false,
  906. columnImage: false,
  907. columnSortable: false,
  908. sortLv: 0,
  909. status: true,
  910. fixed: '',
  911. columnWidth: 150
  912. },
  913. {
  914. userId: this.$store.state.user.name,
  915. functionId: 106001003,
  916. serialNumber: '106001003Table3PartDescription',
  917. tableId: "106001003Table3",
  918. tableName: "工具使用清单",
  919. columnProp: "partDescription",
  920. headerAlign: "center",
  921. align: "left",
  922. columnLabel: "产品名称",
  923. columnHidden: false,
  924. columnImage: false,
  925. columnSortable: false,
  926. sortLv: 0,
  927. status: true,
  928. fixed: '',
  929. columnWidth: 200
  930. },
  931. {
  932. userId: this.$store.state.user.name,
  933. functionId: 106001003,
  934. serialNumber: '106001003Table3Spec',
  935. tableId: "106001003Table3",
  936. tableName: "工具使用清单",
  937. columnProp: "spec",
  938. headerAlign: "center",
  939. align: "left",
  940. columnLabel: "规格型号",
  941. columnHidden: false,
  942. columnImage: false,
  943. columnSortable: false,
  944. sortLv: 0,
  945. status: true,
  946. fixed: '',
  947. columnWidth: 120
  948. },
  949. {
  950. userId: this.$store.state.user.name,
  951. functionId: 106001003,
  952. serialNumber: '106001003Table3RevNo',
  953. tableId: "106001003Table3",
  954. tableName: "工具使用清单",
  955. columnProp: "revNo",
  956. headerAlign: "center",
  957. align: "left",
  958. columnLabel: "工艺路线版本",
  959. columnHidden: false,
  960. columnImage: false,
  961. columnSortable: false,
  962. sortLv: 0,
  963. status: true,
  964. fixed: '',
  965. columnWidth: 100
  966. },
  967. {
  968. userId: this.$store.state.user.name,
  969. functionId: 106001003,
  970. serialNumber: '106001003Table3ItemNo',
  971. tableId: "106001003Table3",
  972. tableName: "工具使用清单",
  973. columnProp: "itemNo",
  974. headerAlign: "center",
  975. align: "left",
  976. columnLabel: "工序号",
  977. columnHidden: false,
  978. columnImage: false,
  979. columnSortable: false,
  980. sortLv: 0,
  981. status: true,
  982. fixed: '',
  983. columnWidth: 60
  984. },
  985. {
  986. userId: this.$store.state.user.name,
  987. functionId: 106001003,
  988. serialNumber: '106001003Table3active',
  989. tableId: "106001003Table3",
  990. tableName: "工具使用清单",
  991. columnProp: "active",
  992. headerAlign: "center",
  993. align: "left",
  994. columnLabel: "产品是否在用",
  995. columnHidden: false,
  996. columnImage: false,
  997. columnSortable: false,
  998. sortLv: 0,
  999. status: true,
  1000. fixed: '',
  1001. columnWidth: 100
  1002. },
  1003. {
  1004. userId: this.$store.state.user.name,
  1005. functionId: 106001003,
  1006. serialNumber: '106001003Table3toolqty',
  1007. tableId: "106001003Table3",
  1008. tableName: "工具使用清单",
  1009. columnProp: "toolqty",
  1010. headerAlign: "center",
  1011. align: "right",
  1012. columnLabel: "工具数量",
  1013. columnHidden: false,
  1014. columnImage: false,
  1015. columnSortable: false,
  1016. sortLv: 0,
  1017. status: true,
  1018. fixed: '',
  1019. columnWidth: 100
  1020. },
  1021. {
  1022. userId: this.$store.state.user.name,
  1023. functionId: 106001003,
  1024. serialNumber: '106001003Table3remark',
  1025. tableId: "106001003Table3",
  1026. tableName: "工具使用清单",
  1027. columnProp: "remark",
  1028. headerAlign: "center",
  1029. align: "left",
  1030. columnLabel: "备注",
  1031. columnHidden: false,
  1032. columnImage: false,
  1033. columnSortable: false,
  1034. sortLv: 0,
  1035. status: true,
  1036. fixed: '',
  1037. columnWidth: 160
  1038. },
  1039. {
  1040. userId: this.$store.state.user.name,
  1041. functionId: 106001003,
  1042. serialNumber: '106001003Table3createdate',
  1043. tableId: "106001003Table3",
  1044. tableName: "工具使用清单",
  1045. columnProp: "createdate",
  1046. headerAlign: "center",
  1047. align: "left",
  1048. columnLabel: "录入日期",
  1049. columnHidden: false,
  1050. columnImage: false,
  1051. columnSortable: false,
  1052. sortLv: 0,
  1053. status: true,
  1054. fixed: '',
  1055. columnWidth: 120
  1056. },
  1057. {
  1058. userId: this.$store.state.user.name,
  1059. functionId: 106001003,
  1060. serialNumber: '106001003Table3createby',
  1061. tableId: "106001003Table3",
  1062. tableName: "工具使用清单",
  1063. columnProp: "createby",
  1064. headerAlign: "center",
  1065. align: "left",
  1066. columnLabel: "录入人",
  1067. columnHidden: false,
  1068. columnImage: false,
  1069. columnSortable: false,
  1070. sortLv: 0,
  1071. status: true,
  1072. fixed: '',
  1073. columnWidth: 100
  1074. }
  1075. ],
  1076. // 数据集
  1077. dataList: [],
  1078. // 导出 start
  1079. exportData: [],
  1080. exportName: "页面功能语言",
  1081. exportHeader: ["页面功能语言"],
  1082. exportFooter: [],
  1083. exportDefaultValue: "这一行这一列没有数据",
  1084. // 导出 end
  1085. buttonList: [
  1086. // {
  1087. // functionId: "106001003",
  1088. // languageValue: '添加',
  1089. // objectId: 'add',
  1090. // objectType: "button",
  1091. // tableId: "toolInfo106001003"
  1092. // },
  1093. // {
  1094. // functionId: "106001003",
  1095. // languageValue: '编辑',
  1096. // objectId: 'edit',
  1097. // objectType: "button",
  1098. // tableId: "toolInfo106001003"
  1099. // },
  1100. // {
  1101. // functionId: "106001003",
  1102. // languageValue: '删除',
  1103. // objectId: 'delete',
  1104. // objectType: "button",
  1105. // tableId: "toolInfo106001003"
  1106. // },
  1107. // {
  1108. // functionId: "106001003",
  1109. // languageValue: '批量删除',
  1110. // objectId: 'deleteList',
  1111. // objectType: "button",
  1112. // tableId: "toolInfo106001003"
  1113. // },
  1114. // {
  1115. // functionId: "106001003",
  1116. // languageValue: '操作',
  1117. // objectId: 'cz',
  1118. // objectType: "button",
  1119. // tableId: "toolInfo106001003"
  1120. // },
  1121. // {
  1122. // functionId: "106001003",
  1123. // languageValue: '查询',
  1124. // objectId: 'search',
  1125. // objectType: "button",
  1126. // tableId: "toolInfo106001003"
  1127. // },
  1128. // {
  1129. // functionId: "106001003",
  1130. // languageValue: '导出',
  1131. // objectId: 'download',
  1132. // objectType: "button",
  1133. // tableId: "toolInfo106001003"
  1134. // },
  1135. // {
  1136. // functionId: "106001003",
  1137. // languageValue: '设置列表',
  1138. // objectId: 'settingTable',
  1139. // objectType: "button",
  1140. // tableId: "toolInfo106001003"
  1141. // },
  1142. // {
  1143. // functionId: "106001003",
  1144. // languageValue: '设置默认配置',
  1145. // objectId: 'defaultTable',
  1146. // objectType: "button",
  1147. // tableId: "toolInfo106001003"
  1148. // }
  1149. ],
  1150. languageList: [],
  1151. languageColumnList: [],
  1152. languageDataList: [],
  1153. queryLanguage: {},
  1154. // 数据集条件
  1155. querySysLanguagePack: {
  1156. page: 1,
  1157. limit: 1,
  1158. languageValue: '',
  1159. objectType: '',
  1160. objectId: ''
  1161. },
  1162. // 分页
  1163. pageIndex: 1,
  1164. pageSize: 20,
  1165. totalPage: 0,
  1166. dataListLoading: false,
  1167. dataListSelections: [],
  1168. addOrUpdateVisible: false
  1169. }
  1170. },
  1171. watch: {
  1172. editData: {
  1173. deep: true,
  1174. handler: function (newV, oldV) {
  1175. if (this.editData.locationId) {
  1176. this.editData.locationId = this.editData.locationId.toUpperCase()
  1177. }
  1178. }
  1179. },
  1180. editHeaderData: {
  1181. deep: true,
  1182. handler: function (newV, oldV) {
  1183. if (this.editHeaderData.toolId) {
  1184. this.editHeaderData.toolId = this.editHeaderData.toolId.toUpperCase()
  1185. }
  1186. }
  1187. },
  1188. },
  1189. mounted() {
  1190. this.$nextTick(() => {
  1191. this.height = window.innerHeight - 310;
  1192. })
  1193. },
  1194. activated() {
  1195. this.getHeaderData()
  1196. // this.getDataList()
  1197. this.getLanguageList()
  1198. },
  1199. methods: {
  1200. // 删除 工具主表信息
  1201. deleteToolHeader() {
  1202. this.$confirm(this.labels.deleteAsk, this.labels.point, {
  1203. confirmButtonText: this.labels.true,
  1204. cancelButtonText:this.labels.cancel,
  1205. type: 'warning'
  1206. }).then(() => {
  1207. let dto = {
  1208. site: this.site,
  1209. toolId: this.headerData.toolId
  1210. }
  1211. // 删除工具主记录
  1212. deleteToolHeader(dto).then(({data}) => {
  1213. if (data.code == 0) {
  1214. this.$message.success(data.msg)
  1215. } else {
  1216. this.$message.warning(data.msg)
  1217. }
  1218. })
  1219. })
  1220. },
  1221. // 选在 tab 时触发
  1222. selectTabs() {
  1223. if (this.activeName == 'tool') {
  1224. this.getToolRouteList()
  1225. }
  1226. },
  1227. // 获取工具对应的使用工序信息
  1228. getToolRouteList() {
  1229. let query = {
  1230. site: this.site,
  1231. toolID: this.headerData.toolId,
  1232. user: this.$store.state.user.name
  1233. }
  1234. searchProcessRouteTool(query).then(({data}) => {
  1235. this.toolRouteDataList = data.rows
  1236. })
  1237. },
  1238. printMethod(val) {
  1239. if (!this.currentDetailData.toolInstanceId) {
  1240. this.$alert(this.labels.toolInstanceIdIn, this.labels.point, {
  1241. confirmButtonText: this.labels.true,
  1242. callback: action => {
  1243. this.bannersBut = false
  1244. }
  1245. });
  1246. return
  1247. }
  1248. let dto = {
  1249. site: this.currentDetailData.site,
  1250. toolInstanceId: this.currentDetailData.toolInstanceId
  1251. }
  1252. printToolData(dto).then(({data}) => {
  1253. if (data.code == 0) {
  1254. let printDataList = []
  1255. let printData = {
  1256. SupplierName: data.data.SupplierName,
  1257. createDate: data.data.createDate,
  1258. createdBy: data.data.createdBy,
  1259. estUseQty: data.data.estUseQty,
  1260. locationId: data.data.locationId,
  1261. phaseInDate: data.data.phaseInDate,
  1262. site: data.data.site,
  1263. spec: data.data.spec,
  1264. status: data.data.status,
  1265. supplierId: data.data.supplierId,
  1266. toolDescription: data.data.toolDescription,
  1267. toolId: data.data.toolId,
  1268. toolInstanceId: this.currentDetailData.toolInstanceId
  1269. }
  1270. printDataList.push(printData)
  1271. if (val == 'Y') {
  1272. this.labelPrintGJ(printDataList)
  1273. } else {
  1274. this.labelPrintWB(printDataList)
  1275. }
  1276. }
  1277. })
  1278. },
  1279. labelPrintWB(printDataList) {
  1280. const LODOP = getLodop()
  1281. if (LODOP) {
  1282. //LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","","");
  1283. //LODOP.SET_LICENSES("", "7B5624CC84E599D6B17F27DF40F4310C", "", "");
  1284. //循环调用打印机
  1285. for (let i = 0; i < printDataList.length; i++) {
  1286. let printData = printDataList[i]
  1287. LODOP.NewPage();
  1288. LODOP.SET_PRINT_PAGESIZE(0, 700, 180, "");
  1289. LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE", 1);
  1290. LODOP.ADD_PRINT_RECT(2, 5, 250, 67, 0, 1);
  1291. LODOP.ADD_PRINT_LINE(19, 5, 18, 255, 0, 1);
  1292. LODOP.ADD_PRINT_LINE(36, 5, 35, 205, 0, 1);
  1293. LODOP.ADD_PRINT_LINE(54, 5, 53, 205, 0, 1);
  1294. LODOP.ADD_PRINT_LINE(2, 65, 69, 66, 0, 1);
  1295. LODOP.ADD_PRINT_LINE(68, 205, 18, 206, 0, 1);
  1296. LODOP.ADD_PRINT_BARCODE(21, 208, 90, 60, "QRCode", printData.toolInstanceId);
  1297. LODOP.ADD_PRINT_TEXT(5, 9, 60, 14, "工具名称");
  1298. LODOP.ADD_PRINT_TEXT(21, 9, 60, 15, "工具编号");
  1299. LODOP.ADD_PRINT_TEXT(38, 9, 60, 15, "实例编号");
  1300. LODOP.ADD_PRINT_TEXT(55, 9, 60, 15, "经办人");
  1301. LODOP.ADD_PRINT_TEXT(4, 70, 180, 14, printData.toolDescription);
  1302. LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
  1303. LODOP.ADD_PRINT_TEXT(21, 71, 133, 14, printData.toolId);
  1304. LODOP.ADD_PRINT_TEXT(39, 71, 133, 14, printData.toolInstanceId);
  1305. LODOP.ADD_PRINT_TEXT(55, 71, 133, 14, printData.createdBy);
  1306. }
  1307. //LODOP.PRINT_DESIGN();
  1308. LODOP.PREVIEW();
  1309. // LODOP.PRINT();
  1310. }
  1311. },
  1312. labelPrintGJ(printDataList) {
  1313. const LODOP = getLodop()
  1314. if (LODOP) {
  1315. //LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","","");
  1316. //LODOP.SET_LICENSES("", "7B5624CC84E599D6B17F27DF40F4310C", "", "");
  1317. //循环调用打印机
  1318. for (let i = 0; i < printDataList.length; i++) {
  1319. let printData = printDataList[i]
  1320. LODOP.NewPage();
  1321. LODOP.SET_PRINT_PAGESIZE(0, 700, 540, "");
  1322. LODOP.ADD_PRINT_RECT(6, 5, 250, 190, 0, 1);
  1323. LODOP.ADD_PRINT_LINE(24, 5, 23, 255, 0, 1);
  1324. LODOP.ADD_PRINT_LINE(41, 5, 40, 255, 0, 1);
  1325. LODOP.ADD_PRINT_LINE(58, 5, 57, 255, 0, 1);
  1326. LODOP.ADD_PRINT_LINE(75, 5, 74, 255, 0, 1);
  1327. LODOP.ADD_PRINT_LINE(92, 5, 91, 255, 0, 1);
  1328. LODOP.ADD_PRINT_LINE(109, 5, 108, 255, 0, 1);
  1329. LODOP.ADD_PRINT_LINE(126, 5, 125, 178, 0, 1);
  1330. LODOP.ADD_PRINT_LINE(144, 5, 143, 178, 0, 1);
  1331. LODOP.ADD_PRINT_LINE(162, 5, 161, 178, 0, 1);
  1332. LODOP.ADD_PRINT_LINE(179, 5, 178, 255, 0, 1);
  1333. LODOP.ADD_PRINT_LINE(23, 65, 195, 66, 0, 1);
  1334. LODOP.ADD_PRINT_LINE(178, 177, 108, 178, 0, 1);
  1335. LODOP.ADD_PRINT_BARCODE(110, 183, 110, 85, "QRCode", printData.toolInstanceId);
  1336. LODOP.ADD_PRINT_TEXT(9, 94, 100, 14, "工具标签");
  1337. LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
  1338. LODOP.ADD_PRINT_TEXT(26, 9, 60, 14, "工具名称");
  1339. LODOP.ADD_PRINT_TEXT(43, 9, 60, 15, "规格型号");
  1340. LODOP.ADD_PRINT_TEXT(60, 9, 60, 15, "工具编号");
  1341. LODOP.ADD_PRINT_TEXT(77, 9, 60, 15, "实例编号");
  1342. LODOP.ADD_PRINT_TEXT(94, 9, 60, 15, "厂商");
  1343. LODOP.ADD_PRINT_TEXT(111, 9, 60, 15, "入库日期");
  1344. LODOP.ADD_PRINT_TEXT(129, 9, 60, 15, "库位");
  1345. LODOP.ADD_PRINT_TEXT(147, 9, 60, 15, "经办人");
  1346. LODOP.ADD_PRINT_TEXT(181, 9, 60, 15, "检验签章");
  1347. LODOP.ADD_PRINT_TEXT(25, 72, 180, 14, printData.toolDescription);
  1348. LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
  1349. LODOP.ADD_PRINT_TEXT(42, 72, 180, 14, printData.spec); // 规格
  1350. LODOP.ADD_PRINT_TEXT(60, 72, 180, 14, printData.toolId);
  1351. LODOP.ADD_PRINT_TEXT(78, 71, 180, 14, printData.toolInstanceId);
  1352. LODOP.ADD_PRINT_TEXT(94, 71, 180, 14, printData.SupplierName);
  1353. LODOP.ADD_PRINT_TEXT(111, 71, 95, 14, this.dayjs(printData.createDate).format("YYYY-MM-DD"));
  1354. LODOP.ADD_PRINT_TEXT(130, 71, 95, 14, printData.locationId);
  1355. LODOP.ADD_PRINT_TEXT(148, 71, 95, 14, printData.createdBy);
  1356. }
  1357. //LODOP.PRINT_DESIGN();
  1358. LODOP.PREVIEW();
  1359. //LODOP.PRINT();
  1360. }
  1361. },
  1362. getBaseData(val) {
  1363. if (this.tagNo === 70) {
  1364. this.headerData.toolId = val.ToolID
  1365. // this.headerData.toolDescription = val.ToolDescription
  1366. this.getHeaderData()
  1367. }
  1368. if (this.tagNo === 3) {
  1369. this.editData.supplierId = val.SupplierID
  1370. this.editData.supplierName = val.SupplierName
  1371. }
  1372. if (this.tagNo === 23) {
  1373. this.editHeaderData.familyId = val.FamilyID
  1374. this.editHeaderData.familyName = val.FamilyName
  1375. }
  1376. if (this.tagNo === 7) {
  1377. this.editHeaderData.umid = val.UMID
  1378. }
  1379. },
  1380. // 获取基础数据列表
  1381. getBaseList(val, number) {
  1382. this.number = number
  1383. this.tagNo = val
  1384. this.$nextTick(() => {
  1385. let strVal = "";
  1386. if (val === 3) {
  1387. strVal = this.editData.supplierId
  1388. }
  1389. if (val === 70) {
  1390. strVal = this.headerData.toolId
  1391. }
  1392. if (val === 23) {
  1393. strVal = this.editHeaderData.familyId
  1394. }
  1395. if (val === 7) {
  1396. strVal = this.editHeaderData.umid
  1397. }
  1398. this.$refs.baseList.init(val, strVal)
  1399. })
  1400. },
  1401. getTime(date) {
  1402. var json_date = new Date(date).toJSON();
  1403. return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  1404. },
  1405. // toolDetail
  1406. initToolModel(val) {
  1407. this.setUp.toolEditFlag = true
  1408. this.setUp.saveToolFlag = false
  1409. if (val != 'Y') {
  1410. this.toolDetailAddOrEdit = true
  1411. this.editData = JSON.parse(JSON.stringify(this.currentDetailData))
  1412. } else {
  1413. Object.assign(this.$data.editData, this.$options.data.call(this).editData);
  1414. this.toolDetailAddOrEdit = false
  1415. this.editData.toolInstanceId = this.headerData.toolId
  1416. this.editData.locationId = this.headerData.defaultLocationId
  1417. this.editData.toolId = this.headerData.toolId
  1418. this.editData.status = '未投用'
  1419. }
  1420. },
  1421. async saveAndUpdateToolDetail() {
  1422. this.setUp.saveToolFlag = true
  1423. this.editData.purchaseDate = this.editData.strPurchaseDate
  1424. this.editData.phaseInDate = this.editData.strPhaseInDate
  1425. this.editData.phaseOutDate = this.editData.strPhaseOutDate
  1426. if (!this.editData.estUseQty || this.editData.estUseQty == 0) {
  1427. this.$message.warning(this.labels.warning1)
  1428. return
  1429. }
  1430. if (this.toolDetailAddOrEdit) {
  1431. await updateToolDetail(this.editData).then(({data}) => {
  1432. if (data.code == 0) {
  1433. this.$message.success(data.msg)
  1434. this.setUp.toolEditFlag = false
  1435. } else {
  1436. this.$message.error(data.msg)
  1437. }
  1438. this.setUp.saveToolFlag = false
  1439. })
  1440. } else {
  1441. await saveToolInfoDetail(this.editData).then(({data}) => {
  1442. if (data.code == 0) {
  1443. this.$message.success(data.msg)
  1444. this.setUp.toolEditFlag = false
  1445. } else {
  1446. this.$message.error(data.msg)
  1447. }
  1448. this.setUp.saveToolFlag = false
  1449. })
  1450. }
  1451. await this.getDetailList()
  1452. this.currentDetailData.toolInstanceId = this.editData.toolInstanceId
  1453. this.toolInstanceIdChange()
  1454. },
  1455. // toolHeader
  1456. initToolHeaderModel(val) {
  1457. this.toolHeaderShow = true
  1458. if (val == 'Y') {
  1459. this.toolDetailAddOrEdit = true
  1460. Object.assign(this.$data.editHeaderData, this.$options.data.call(this).editHeaderData);
  1461. } else {
  1462. this.toolDetailAddOrEdit = false
  1463. this.editHeaderData = JSON.parse(JSON.stringify(this.headerData))
  1464. this.editHeaderData.active = this.headerData.active == 'Y' ? true : false
  1465. }
  1466. },
  1467. saveAndUpdateToolHeader() {
  1468. if (!this.editHeaderData.toolId) {
  1469. this.$message.warning(this.labels.toolIdIn)
  1470. return
  1471. }
  1472. if (!this.editHeaderData.familyId) {
  1473. this.$message.warning(this.labels.familyIdIn)
  1474. return
  1475. }
  1476. if (!this.editHeaderData.umid) {
  1477. this.$message.warning(this.labels.umidIn)
  1478. return
  1479. }
  1480. this.editHeaderData.active = this.editHeaderData.active ? 'Y' : 'N'
  1481. if (this.toolDetailAddOrEdit) {
  1482. this.editHeaderData.createdBy = this.$store.state.user.name
  1483. saveToolHeader(this.editHeaderData).then(({data}) => {
  1484. if (data.code == 0) {
  1485. this.toolHeaderShow = false
  1486. this.headerData.toolId = this.editHeaderData.toolId
  1487. this.getHeaderData()
  1488. this.$message.success(data.msg)
  1489. } else {
  1490. this.$message.warning(data.msg)
  1491. }
  1492. })
  1493. } else {
  1494. editToolHeader(this.editHeaderData).then(({data}) => {
  1495. if (data.code == 0) {
  1496. this.$message.success(data.msg)
  1497. this.toolHeaderShow = false
  1498. this.headerData.toolId = this.editHeaderData.toolId
  1499. this.getHeaderData()
  1500. } else {
  1501. this.$message.warning(data.msg)
  1502. }
  1503. })
  1504. }
  1505. },
  1506. getToolHeaderList() {
  1507. getToolHeaderList(this.queryHeaderData).then(({data}) => {
  1508. this.toolHeaderList = data.rows
  1509. })
  1510. },
  1511. //获取工具使用记录
  1512. getSfdcToolingHistList() {
  1513. let queryData = {
  1514. site: this.site,
  1515. toolInstanceId: this.currentDetailData.toolInstanceId
  1516. }
  1517. getSfdcToolingHistList(queryData).then(({data}) => {
  1518. this.sfdcToolingHistList = data.rows
  1519. })
  1520. },
  1521. //获取工具使用记录
  1522. getToolInstanceIdUseHist() {
  1523. let queryData = {
  1524. site: this.site,
  1525. toolInstanceId: this.currentDetailData.toolInstanceId
  1526. }
  1527. getToolInstanceIdUseHist(queryData).then(({data}) => {
  1528. this.toolInstanceIdUseHist = data.rows
  1529. })
  1530. },
  1531. toolInstanceIdChange() {
  1532. this.sfdcToolingHistList = []
  1533. this.toolInstanceIdUseHist = []
  1534. let queryData = {
  1535. site: this.site,
  1536. toolInstanceId: this.currentDetailData.toolInstanceId,
  1537. }
  1538. getToolDetailList(queryData).then(({data}) => {
  1539. let list = data.rows
  1540. if (list.length > 0) {
  1541. this.currentDetailData = list[0]
  1542. this.getToolInstanceIdUseHist()
  1543. this.getSfdcToolingHistList()
  1544. }
  1545. })
  1546. },
  1547. async getDetailList() {
  1548. this.currentDetailData = {}
  1549. this.selectList.select4 = []
  1550. this.sfdcToolingHistList = []
  1551. this.toolInstanceIdUseHist = []
  1552. let queryData = {
  1553. site: this.site,
  1554. toolId: this.headerData.toolId,
  1555. toolDescription: this.headerData.toolDescription,
  1556. }
  1557. await getToolDetailList(queryData).then(({data}) => {
  1558. let list = data.rows
  1559. for (let i = 0; i < list.length; i++) {
  1560. let selectData = {
  1561. value: list[i].toolInstanceId,
  1562. label: list[i].toolInstanceId,
  1563. }
  1564. this.selectList.select4.push(selectData);
  1565. }
  1566. if (list.length > 0) {
  1567. this.currentDetailData = list[0]
  1568. this.toolInstanceIdChange()
  1569. }
  1570. })
  1571. },
  1572. //获取主记录信息
  1573. getHeaderData() {
  1574. let queryData = {
  1575. site: this.site,
  1576. toolId: this.headerData.toolId,
  1577. // toolDescription: this.headerData.toolDescription,
  1578. }
  1579. getToolHeaderData(queryData).then(({data}) => {
  1580. if (data.code == 0) {
  1581. this.headerData = data.row ? data.row : this.headerData
  1582. this.getDetailList()
  1583. }
  1584. })
  1585. },
  1586. // 打印方式
  1587. printReport() {
  1588. alert(this.$store.state.user.site)
  1589. //
  1590. // const LODOP = getLodop()
  1591. // if (LODOP) {
  1592. // var strBodyStyle = '<style>'
  1593. // strBodyStyle += 'table { border-top: 1 solid #000000; border-left: 1 solid #000000; border-collapse:collapse; border-spacing:0;}'
  1594. // strBodyStyle += 'caption { line-height:2em; }'
  1595. // strBodyStyle += 'td { border-right: 1 solid #000000; border-bottom: 1 solid #000000; text-align:center; padding:2px 3px; font-size:11px;}'
  1596. // strBodyStyle += '</style>' //设置打印样式
  1597. // var strFormHtml = strBodyStyle + '<body>' + document.getElementById('commmon').innerHTML + '</body>' //获取打印内容
  1598. //
  1599. // LODOP.PRINT_INIT('') //初始化
  1600. // LODOP.PRINT_DESIGN();
  1601. // //LODOP.PREVIEW();
  1602. // //LODOP.PRINT();
  1603. //
  1604. // LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') //设置横向
  1605. // LODOP.ADD_PRINT_HTM('1%', '1%', '98%', '98%', strFormHtml) //设置打印内容
  1606. // LODOP.SET_PREVIEW_WINDOW(2, 0, 0, 800, 600, '') //设置预览窗口模式和大小
  1607. // LODOP.PREVIEW()
  1608. // }
  1609. },
  1610. // 校验用户是否收藏
  1611. favoriteIsOk() {
  1612. let userFavorite = {
  1613. userId: this.$store.state.user.id,
  1614. languageCode: this.$i18n.locale
  1615. }
  1616. userFavoriteList(userFavorite).then(({data}) => {
  1617. let size = data.list.filter(item => item.menuId == this.$route.meta.menuId).length;
  1618. if (size > 0) {
  1619. this.favorite = true
  1620. } else {
  1621. this.favorite = false
  1622. }
  1623. })
  1624. },
  1625. // 收藏 OR 取消收藏
  1626. favoriteFunction() {
  1627. let userFavorite = {
  1628. userId: this.$store.state.user.id,
  1629. functionId: 106001003,
  1630. }
  1631. if (this.favorite) {
  1632. // 取消收藏
  1633. this.$confirm(this.labels.cancelAsk, this.labels.point, {
  1634. confirmButtonText: this.labels.true,
  1635. cancelButtonText: this.labels.cancel,
  1636. type: 'warning'
  1637. }).then(() => {
  1638. removeUserFavorite(userFavorite).then(({data}) => {
  1639. this.$message.success(data.msg)
  1640. this.favorite = false
  1641. })
  1642. })
  1643. } else {
  1644. // 收藏
  1645. saveUserFavorite(userFavorite).then(({data}) => {
  1646. this.$message.success(data.msg)
  1647. this.favorite = true
  1648. })
  1649. }
  1650. },
  1651. // 保存语言编辑
  1652. saveLanguageList(val) {
  1653. saveSysLanguageOne(val).then(({data}) => {
  1654. if (data.code == 0) {
  1655. this.$message.success(data.msg)
  1656. } else {
  1657. this.$message.error(data.msg)
  1658. }
  1659. })
  1660. },
  1661. // 编辑语言
  1662. addLanguageFun() {
  1663. if (this.querySysLanguagePack.languageCode) {
  1664. this.addLanguage = true
  1665. this.languageColumnList = []
  1666. let query = {
  1667. functionId: 106001003,
  1668. tableId: "common1002",
  1669. languageCode: this.$i18n.locale
  1670. }
  1671. getTableDefaultListLanguage(query).then(({data}) => {
  1672. if (data.rows.length > 0) {
  1673. this.languageColumnList = data.rows
  1674. }
  1675. })
  1676. this.languageColumnList = this.columnList
  1677. searchLanguageListByLanguageCode(this.querySysLanguagePack).then(({data}) => {
  1678. this.languageDataList = data.rows
  1679. })
  1680. } else {
  1681. this.$message("请选中一种语言")
  1682. }
  1683. },
  1684. // 获取多语言列表
  1685. getLanguageList() {
  1686. searchSysLanguage(this.queryLanguage).then(({data}) => {
  1687. this.languageList = data.rows
  1688. })
  1689. },
  1690. // 获取button的词典
  1691. getFunctionButtonList() {
  1692. //首先查询当前按钮的多语言
  1693. searchFunctionButtonList(this.queryButton).then(({data}) => {
  1694. if (JSON.stringify(data.data) != '{}') {
  1695. this.buttons = data.data
  1696. } else {
  1697. // saveButtonList(this.buttonList).then(({data}) => {
  1698. // })
  1699. }
  1700. });
  1701. //其次查询当前标签的多语言
  1702. searchFunctionButtonList(this.queryLabel).then(({data}) => {
  1703. if (JSON.stringify(data.data) != '{}') {
  1704. this.labels = data.data
  1705. } else {
  1706. // saveButtonList(this.buttonList).then(({data}) => {
  1707. // })
  1708. }
  1709. });
  1710. },
  1711. // 获取语言词典
  1712. getSysLanguageParamList() {
  1713. searchSysLanguageParam(this.querySysLanguageParam).then(({data}) => {
  1714. this.sysLanguageParams = data.rows
  1715. })
  1716. },
  1717. // 打开页面设置
  1718. userSetting() {
  1719. this.visible = true;
  1720. let queryTable = {
  1721. userId: this.$store.state.user.name,
  1722. functionId: 106001003,
  1723. tableId: "toolInfo106001003",
  1724. languageCode: this.$i18n.locale
  1725. }
  1726. this.$nextTick(() => {
  1727. this.$refs.column.init(queryTable);
  1728. });
  1729. },
  1730. // 获取 用户保存的 格式列
  1731. getTableUserColumn() {
  1732. getTableUserListLanguage(this.queryTableUser).then(({data}) => {
  1733. if (data.rows.length > 0) {
  1734. //this.columnList = []
  1735. this.columnList = data.rows
  1736. } else {
  1737. this.getColumnList()
  1738. }
  1739. })
  1740. },
  1741. // 保存 默认配置 列
  1742. async saveColumnList() {
  1743. // 删除所有的该页面下保存的数据
  1744. if (this.userColumnList) {
  1745. //删除 user自定义的数据
  1746. await removerUser(this.queryTable)
  1747. }
  1748. // 删除默认配置
  1749. await removerDefault(this.queryTable)
  1750. // 保存页面 table属性
  1751. let sumColumnList = this.columnList.concat(this.columnList1);
  1752. sumColumnList = sumColumnList.map(item => {
  1753. return item = {
  1754. tableId: item.tableId,
  1755. tableName: item.tableName,
  1756. columnProp: item.columnProp,
  1757. columnLabel: item.columnLabel,
  1758. columnHidden: false,
  1759. columnImage: false,
  1760. columnSortable: item.columnSortable,
  1761. columnWidth: item.columnWidth,
  1762. format: item.format,
  1763. functionId: 106001003,
  1764. sortLv: item.sortLv,
  1765. status: true,
  1766. fixed: item.fixed,
  1767. serialNumber: item.serialNumber,
  1768. columnType: item.columnType,
  1769. align: item.align
  1770. }
  1771. })
  1772. await saveTableDefaultList(sumColumnList)
  1773. // 保存页面 button label title 属性
  1774. let buttons = this.buttonList.map(item => {
  1775. return item = {
  1776. functionId: 106001003,
  1777. languageValue: item.languageValue,
  1778. objectId: item.objectId,
  1779. objectType: item.objectType,
  1780. tableId: item.tableId
  1781. }
  1782. })
  1783. await saveButtonList(buttons)
  1784. this.getFunctionButtonList()
  1785. this.getColumnList()
  1786. },
  1787. // 获取 tableDefault 列
  1788. getColumnList() {
  1789. getTableDefaultListLanguage(this.queryTable).then(({data}) => {
  1790. if (!data.rows.length == 0) {
  1791. // this.showDefault = false
  1792. this.columnList = data.rows
  1793. } else {
  1794. // this.showDefault = true
  1795. }
  1796. })
  1797. },
  1798. // 获取数据列表
  1799. getDataList() {
  1800. this.dataListLoading = true
  1801. searchSysLanguagePackList(this.querySysLanguagePack).then(({data}) => {
  1802. if (data && data.code === 0) {
  1803. this.dataList = data.page.list
  1804. this.totalPage = data.page.totalCount
  1805. } else {
  1806. this.dataList = []
  1807. this.totalPage = 0
  1808. }
  1809. this.dataListLoading = false
  1810. })
  1811. },
  1812. // 每页数
  1813. sizeChangeHandle(val) {
  1814. this.pageSize = val
  1815. this.pageIndex = 1
  1816. this.getDataList()
  1817. },
  1818. // 当前页
  1819. currentChangeHandle(val) {
  1820. this.pageIndex = val
  1821. this.getDataList()
  1822. },
  1823. // 多选
  1824. selectionChangeHandle(val) {
  1825. this.dataListSelections = val
  1826. },
  1827. // 删除
  1828. deleteHandle(id) {
  1829. var ids = id ? [id] : this.dataListSelections.map(item => {
  1830. return item.id
  1831. })
  1832. this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
  1833. confirmButtonText: '确定',
  1834. cancelButtonText: '取消',
  1835. type: 'warning'
  1836. }).then(() => {
  1837. this.$http({
  1838. url: this.$http.adornUrl('//prd/delete'),
  1839. method: 'post',
  1840. data: this.$http.adornData(ids, false)
  1841. }).then(({data}) => {
  1842. if (data && data.code === 0) {
  1843. this.$message.success('操作成功')
  1844. this.getDataList()
  1845. } else {
  1846. this.$message.error(data.msg)
  1847. }
  1848. })
  1849. })
  1850. },
  1851. fields() {
  1852. let json = "{"
  1853. this.columnList.forEach((item, index) => {
  1854. if (index == this.columnList.length - 1) {
  1855. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1856. } else {
  1857. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1858. }
  1859. })
  1860. json += "}"
  1861. let s = eval("(" + json + ")")
  1862. return s
  1863. },
  1864. createExportData() {
  1865. // 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据
  1866. // TODO:构造需要下载的数据返回
  1867. if (this.dataListSelections.length > 0) {
  1868. return this.dataListSelections;
  1869. }
  1870. return this.dataList;
  1871. },
  1872. startDownload() {
  1873. // this.exportData = this.dataList
  1874. },
  1875. finishDownload() {
  1876. },
  1877. //获取按钮的权限数据
  1878. getButtonAuthData(){
  1879. let updateFlag = this.isAuth(this.menuId+":revise");
  1880. let fullControFlag = this.isAuth(this.menuId+":fullContro");
  1881. let deleteFlag = this.isAuth(this.menuId+":remove");
  1882. //处理页面的权限数据
  1883. this.authEdit = !updateFlag ||!fullControFlag;
  1884. this.authAdd = !fullControFlag;
  1885. this.authDelete = !deleteFlag;
  1886. },
  1887. // 获取 用户保存的 格式列
  1888. async getTableUserColumn2(tableId, columnId) {
  1889. let queryTableUser = {
  1890. userId: this.$store.state.user.name,
  1891. functionId: this.$route.meta.menuId,
  1892. tableId: tableId,
  1893. status: true,
  1894. languageCode: this.$i18n.locale
  1895. }
  1896. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1897. if (data.rows.length > 0) {
  1898. //this.columnList = []
  1899. switch (columnId) {
  1900. case 1:
  1901. this.columnList = data.rows
  1902. break;
  1903. case 2:
  1904. this.columnList1 = data.rows
  1905. break;
  1906. case 3:
  1907. this.routeToolList = data.rows
  1908. break;
  1909. }
  1910. } else {
  1911. this.getColumnList2(tableId, columnId)
  1912. }
  1913. })
  1914. },
  1915. // 获取 tableDefault 列
  1916. async getColumnList2(tableId, columnId) {
  1917. this.queryTable.tableId = tableId
  1918. let queryTable= {
  1919. functionId: this.$route.meta.menuId,
  1920. tableId: tableId,
  1921. languageCode: this.$i18n.locale
  1922. }
  1923. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1924. if (!data.rows.length == 0) {
  1925. switch (columnId) {
  1926. case 1:
  1927. this.columnList = data.rows
  1928. break;
  1929. case 2:
  1930. this.columnList1 = data.rows
  1931. break;
  1932. case 3:
  1933. this.routeToolList = data.rows
  1934. break;
  1935. }
  1936. } else {
  1937. // this.showDefault = true
  1938. }
  1939. })
  1940. },
  1941. },
  1942. created() {
  1943. this.getTableUserColumn2('toolUseHist106001003',1)
  1944. this.getTableUserColumn2('service106001003',2)
  1945. this.getTableUserColumn2('106001003Table3',3)
  1946. //获取按钮的权限
  1947. this.getButtonAuthData();
  1948. this.getTableUserColumn()
  1949. this.getSysLanguageParamList()
  1950. this.getFunctionButtonList()
  1951. this.favoriteIsOk()
  1952. }
  1953. }
  1954. </script>
  1955. <style scoped>
  1956. .el-header, .el-footer {
  1957. background-color: #B3C0D1;
  1958. color: #333;
  1959. text-align: center;
  1960. line-height: 60px;
  1961. height: 300px;
  1962. }
  1963. .el-aside {
  1964. background-color: #D3DCE6;
  1965. color: #333;
  1966. /*text-align: center;*/
  1967. /*line-height: 200px;*/
  1968. }
  1969. .el-main {
  1970. background-color: #E9EEF3;
  1971. color: #333;
  1972. }
  1973. body > .el-container {
  1974. margin-bottom: 40px;
  1975. }
  1976. .el-container:nth-child(5) .el-aside,
  1977. .el-container:nth-child(6) .el-aside {
  1978. line-height: 260px;
  1979. }
  1980. .el-container:nth-child(7) .el-aside {
  1981. line-height: 320px;
  1982. }
  1983. /deep/ .customer-tab .el-tabs__content {
  1984. padding: 3px !important;
  1985. }
  1986. /deep/ .customer-tab .el-tabs__item {
  1987. padding: 0 20px;
  1988. height: 30px;
  1989. -webkit-box-sizing: border-box;
  1990. box-sizing: border-box;
  1991. line-height: 30px;
  1992. display: inline-block;
  1993. list-style: none;
  1994. font-size: 12px;
  1995. font-weight: 500;
  1996. color: #303133;
  1997. position: relative;
  1998. }
  1999. /*统一的input内容颜色样式*/
  2000. .customer-input-color-red /deep/ .el-input__inner {
  2001. color: red;
  2002. }
  2003. </style>