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.

1648 lines
56 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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
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
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year 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
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years 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="'申请单号'">
  5. <el-input v-model="searchData.applyNo" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="申请日期">
  8. <el-date-picker
  9. value-format="yyyy-MM-dd"
  10. style="width: 100%"
  11. v-model="searchData.startDate"
  12. type="date"
  13. placeholder="开始日期">
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item label="到">
  17. <el-date-picker
  18. value-format="yyyy-MM-dd"
  19. style="width: 100%"
  20. v-model="searchData.endDate"
  21. type="date"
  22. placeholder="结束日期">
  23. </el-date-picker>
  24. </el-form-item>
  25. <el-form-item label=" ">
  26. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  27. <!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>-->
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ '导出' }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <el-table
  45. :height="height"
  46. :data="dataList1"
  47. border
  48. ref="mainTable"
  49. @row-click="changeData"
  50. highlight-current-row
  51. v-loading="dataListLoading"
  52. style="width: 100%;">
  53. <el-table-column
  54. header-align="center"
  55. align="center"
  56. width="150"
  57. fixed="right"
  58. label="操作">
  59. <template slot-scope="scope">
  60. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="comfirmApply(scope.row)">下达</a>
  61. <a type="text" size="small" v-if="scope.row.status=='审批中'" @click="editModal(scope.row)">审批</a>
  62. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="cancelApply(scope.row)">取消申请</a>
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. v-for="(item,index) in columnList1" :key="index"
  67. :sortable="item.columnSortable"
  68. :prop="item.columnProp"
  69. :header-align="item.headerAlign"
  70. :show-overflow-tooltip="item.showOverflowTooltip"
  71. :align="item.align"
  72. :fixed="item.fixed==''?false:item.fixed"
  73. :min-width="item.columnWidth"
  74. :label="item.columnLabel">
  75. <template slot-scope="scope">
  76. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  77. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  78. style="width: 100px; height: 80px"/></span>
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <el-pagination
  83. @size-change="sizeChangeHandle"
  84. @current-change="currentChangeHandle"
  85. :current-page="pageIndex"
  86. :page-sizes="[20, 50, 100, 1000]"
  87. :page-size="pageSize"
  88. :total="totalPage"
  89. layout="total, sizes, prev, pager, next, jumper">
  90. </el-pagination>
  91. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  92. <el-tab-pane label="工具明细" name="detail">
  93. <el-table
  94. :data="detailList"
  95. height="240"
  96. border
  97. v-loading="dataListLoading"
  98. style="width: 100%; ">
  99. <el-table-column
  100. v-for="(item,index) in columnList2" :key="index"
  101. :sortable="item.columnSortable"
  102. :prop="item.columnProp"
  103. :header-align="item.headerAlign"
  104. :show-overflow-tooltip="item.showOverflowTooltip"
  105. :align="item.align"
  106. :fixed="item.fixed==''?false:item.fixed"
  107. :min-width="item.columnWidth"
  108. :label="item.columnLabel">
  109. <template slot-scope="scope">
  110. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  111. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  112. style="width: 100px; height: 80px"/></span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. header-align="center"
  117. align="center"
  118. width="120"
  119. fixed="right"
  120. label="操作">
  121. <template slot-scope="scope">
  122. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  123. </template>
  124. </el-table-column>
  125. <!-- <el-table-column-->
  126. <!-- fixed="right"-->
  127. <!-- header-align="center"-->
  128. <!-- align="center"-->
  129. <!-- width="100"-->
  130. <!-- label="操作">-->
  131. <!-- <template slot-scope="scope">-->
  132. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  133. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  134. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  135. <!-- </template>-->
  136. <!-- </el-table-column>-->
  137. </el-table>
  138. </el-tab-pane>
  139. <el-tab-pane label="附件信息" name="down">
  140. <oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  141. <!--文件上传-->
  142. <!-- <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">-->
  143. <!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
  144. <!-- <el-button type="primary" @click="addUploadFileModal()">上传文件</el-button>-->
  145. <!-- </el-form>-->
  146. <!-- </el-form>-->
  147. <!-- <el-table-->
  148. <!-- :data="fileContentList"-->
  149. <!-- height="240"-->
  150. <!-- border-->
  151. <!-- v-loading="dataListLoading"-->
  152. <!-- style="width: 100%; ">-->
  153. <!-- <el-table-column-->
  154. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  155. <!-- :sortable="item.columnSortable"-->
  156. <!-- :prop="item.columnProp"-->
  157. <!-- :header-align="item.headerAlign"-->
  158. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  159. <!-- :align="item.align"-->
  160. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  161. <!-- :min-width="item.columnWidth"-->
  162. <!-- :label="item.columnLabel">-->
  163. <!-- <template slot-scope="scope">-->
  164. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  165. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  166. <!-- style="width: 100px; height: 80px"/></span>-->
  167. <!-- </template>-->
  168. <!-- </el-table-column>-->
  169. <!-- <el-table-column-->
  170. <!-- fixed="right"-->
  171. <!-- header-align="center"-->
  172. <!-- align="center"-->
  173. <!-- width="100"-->
  174. <!-- label="操作">-->
  175. <!-- <template slot-scope="scope">-->
  176. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  177. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  178. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  179. <!-- </template>-->
  180. <!-- </el-table-column>-->
  181. <!-- </el-table>-->
  182. </el-tab-pane>
  183. <!-- 审批信息 -->
  184. <el-tab-pane label="审批信息" name="approvalInformation">
  185. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  186. </el-tab-pane>
  187. <el-tab-pane label="处理信息" name="tab4">
  188. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  189. <!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
  190. <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>
  191. </el-form>
  192. <el-form label-position="top" :model="currentRow" >
  193. <el-row :gutter="15">
  194. <el-col :span="6">
  195. <el-form-item label="IFS PR编号" >
  196. <el-input v-model="currentRow.prNo" readonly></el-input>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="18">
  200. <el-form-item label="备注" >
  201. <el-input v-model="currentRow.remark1" readonly></el-input>
  202. </el-form-item>
  203. </el-col>
  204. </el-row>
  205. <el-row :gutter="15" style="margin-top: 20px">
  206. <el-col :span="6">
  207. <el-form-item label="采购订单号" >
  208. <el-input v-model="currentRow.poNo" readonly ></el-input>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="6">
  212. <el-form-item label="厂商名称" >
  213. <el-input v-model="currentRow.supplierName" readonly></el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="6">
  217. <el-form-item label="总成本(元)" >
  218. <el-input v-model="currentRow.allCost" readonly></el-input>
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. <el-row :gutter="15" style="margin-top: 0px">
  223. <el-col :span="24">
  224. <el-form-item label="备注" >
  225. <el-input v-model="currentRow.remark2" readonly></el-input>
  226. </el-form-item>
  227. </el-col>
  228. </el-row>
  229. </el-form>
  230. </el-tab-pane>
  231. </el-tabs>
  232. <el-dialog
  233. width="800px" v-drag
  234. :title="'刀模申请审批'"
  235. :close-on-click-modal="false"
  236. :visible.sync="visible">
  237. <el-form :inline="true" label-position="top" label-width="100px" >
  238. <el-form-item :label="'申请编号'">
  239. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  240. </el-form-item>
  241. <el-form-item :label="'申请总数'">
  242. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  243. </el-form-item>
  244. <el-form-item label="部门" required="required">
  245. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  246. </el-form-item>
  247. <el-form-item :label="'申请人'" required="required">
  248. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  249. </el-form-item>
  250. <el-form-item :label="'申请日期'" required="required">
  251. <el-date-picker
  252. value-format="yyyy-MM-dd"
  253. style="width: 100%"
  254. v-model="dataForm.applyDate"
  255. type="date"
  256. disabled
  257. placeholder="结束日期">
  258. </el-date-picker>
  259. </el-form-item>
  260. <el-form-item required="required">
  261. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
  262. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  263. </el-form-item>
  264. <el-form-item required="required">
  265. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
  266. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  267. </el-form-item>
  268. <el-form-item required="required">
  269. <span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
  270. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  271. </el-form-item>
  272. </el-form>
  273. <el-form :inline="true" label-position="top" label-width="100px" >
  274. <el-form-item :label="'申请原因'">
  275. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  276. v-model="dataForm.applyReason"/>
  277. </el-form-item>
  278. </el-form>
  279. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  280. <el-form-item :label="'备注'">
  281. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  282. v-model="dataForm.remark"/>
  283. </el-form-item>
  284. </el-form>
  285. <div class="rq" style="margin-top: 60px">
  286. <el-table
  287. height="250"
  288. :data="toolData"
  289. border
  290. ref="toolTable"
  291. v-loading="dataListLoading"
  292. style="width: 100%;">
  293. <el-table-column
  294. v-for="(item,index) in columnList2" :key="index"
  295. :sortable="item.columnSortable"
  296. :prop="item.columnProp"
  297. :header-align="item.headerAlign"
  298. :show-overflow-tooltip="item.showOverflowTooltip"
  299. :align="item.align"
  300. :fixed="item.fixed==''?false:item.fixed"
  301. :min-width="item.columnWidth"
  302. :label="item.columnLabel">
  303. <template slot-scope="scope">
  304. <div v-if="item.columnProp !== 'applyQty' ">
  305. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  306. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  307. style="width: 100px; height: 80px"/></span>
  308. </div>
  309. <div v-else>
  310. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  311. style="width:98%"></el-input>
  312. </div>
  313. </template>
  314. </el-table-column>
  315. </el-table>
  316. </div>
  317. <span slot="footer" class="dialog-footer">
  318. <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
  319. <el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
  320. <el-button v-if="dataForm.status === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  321. <el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
  322. </span>
  323. </el-dialog>
  324. <el-dialog
  325. width="600px" v-drag
  326. :title="'处理信息'"
  327. :close-on-click-modal="false"
  328. :visible.sync="modelFlag">
  329. <el-form label-position="top" >
  330. <el-row :gutter="15" >
  331. <el-col :span="6">
  332. <el-form-item label="IFS PR编号" >
  333. <el-input v-model="modelData.prNo" ></el-input>
  334. </el-form-item>
  335. </el-col>
  336. <el-col :span="18">
  337. <el-form-item label="备注" >
  338. <el-input v-model="modelData.remark1" ></el-input>
  339. </el-form-item>
  340. </el-col>
  341. </el-row>
  342. <el-row :gutter="15" style="margin-top: 20px" >
  343. <el-col :span="6">
  344. <el-form-item label="采购订单号" >
  345. <el-input v-model="modelData.poNo" ></el-input>
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="6">
  349. <el-form-item label="厂商名称" >
  350. <el-input v-model="modelData.supplierName" ></el-input>
  351. </el-form-item>
  352. </el-col>
  353. <el-col :span="6">
  354. <el-form-item label="总成本(元)" >
  355. <el-input v-model="modelData.allCost" type="number" ></el-input>
  356. </el-form-item>
  357. </el-col>
  358. </el-row>
  359. <el-row :gutter="15" style="margin-top: 0px">
  360. <el-col :span="24">
  361. <el-form-item label="备注" >
  362. <el-input v-model="modelData.remark2" ></el-input>
  363. </el-form-item>
  364. </el-col>
  365. </el-row>
  366. </el-form>
  367. <span slot="footer" class="dialog-footer">
  368. <el-button type="primary" @click="saveHeaderMessage()">{{'保存'}}</el-button>
  369. <el-button type="primary" @click="modelFlag = false">{{'取消'}}</el-button>
  370. </span>
  371. </el-dialog>
  372. <!-- 提交 -->
  373. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  374. <el-form :inline="true" label-position="top">
  375. <el-form-item :label="'驳回意见'">
  376. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  377. </el-form-item>
  378. </el-form>
  379. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  380. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  381. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  382. </el-footer>
  383. </el-dialog>
  384. <!-- 上传文件的modal -->
  385. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  386. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  387. </div>
  388. </template>
  389. <script>
  390. import {
  391. customerInformationSearch, // 客户信息列表查询`
  392. } from '@/api/customer/customerInformation.js'
  393. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  394. import Chooselist from '@/views/modules/common/Chooselist'
  395. import {searchProjectToolApplyHeader,
  396. searchProjectToolApplyDetail,
  397. comfirmProjectToolApply,
  398. cancelProjectToolApply,
  399. saveProjectHeaderMessage,
  400. editToolApplication,
  401. submitChange
  402. } from "@/api/tool/toolApply.js"
  403. import {
  404. deleteProjectFile,
  405. getFileContentList,
  406. downLoadProjectFile,
  407. getProjectPartNowBm,
  408. } from "@/api/project/project.js"
  409. import {
  410. getNodeAuthority, // 获取节点权限
  411. getApprovalList, // 查询审批信息
  412. } from '@/api/changeManagement/changeManagement.js'
  413. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  414. import OssComponents from "../oss/ossComponents";
  415. import DictDataSelect from "../sys/dict-data-select.vue"
  416. /*組件*/
  417. export default {
  418. components: {
  419. ApprovalInformation,
  420. OssComponents,
  421. Chooselist,
  422. projectUploadFile,
  423. DictDataSelect,
  424. },
  425. name: "null",
  426. data() {
  427. return {
  428. visible:false,
  429. fileContentList: [],
  430. activeName: 'detail',
  431. searchData:{
  432. page: 1,
  433. limit: 100,
  434. site:this.$store.state.user.site,
  435. applyNo:'',
  436. startDate:'',
  437. endDate:'',
  438. },
  439. toolData:[],
  440. dataForm:{
  441. site: '',
  442. applyNo: '',
  443. applyBy:'',
  444. applyDate:'',
  445. applySumQty:'',
  446. applyReason:'',
  447. remark:'',
  448. createBy:'',
  449. detailList:[],
  450. status: '',
  451. rejectOpinion: '',
  452. nodeConclusion: '',
  453. quoter: '',
  454. quoterName: '',
  455. tp: '',
  456. tpName: '',
  457. purchaser: '',
  458. purchaserName: '',
  459. menuId: this.$route.meta.menuId,
  460. userName: this.$store.state.user.name,
  461. },
  462. modelData:{
  463. site:'',
  464. applyNo:'',
  465. prNo:'',
  466. remark1:'',
  467. poNo:'',
  468. supplierName:'',
  469. allCost:'',
  470. remark2:'',
  471. },
  472. modelFlag:false,
  473. currentRow:{},
  474. currentRow2:{},
  475. height: 200,
  476. dataList1:[],
  477. detailList:[],
  478. dataListLoading: false,
  479. // 导出 start
  480. exportData: [],
  481. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  482. exportHeader: ["项目清单"],
  483. exportFooter: [],
  484. exportList:[],
  485. // 导出 start
  486. exportData2: [],
  487. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  488. exportHeader2: ["项目客户联系人"],
  489. exportFooter2: [],
  490. exportList2:[],
  491. tagNo:'',
  492. tagNo2:'',
  493. pageIndex: 1,
  494. pageSize: 100,
  495. totalPage: 0,
  496. ossColumns:[
  497. {
  498. userId: this.$store.state.user.name,
  499. functionId: 103001,
  500. serialNumber: '103001Table2FileName',
  501. tableId: '103001Table2',
  502. tableName: '文件信息表',
  503. columnProp: 'fileName',
  504. headerAlign: 'center',
  505. align: 'center',
  506. columnLabel: '文件名称',
  507. columnHidden: false,
  508. columnImage: false,
  509. columnSortable: false,
  510. sortLv: 0,
  511. status: true,
  512. fixed: '',
  513. columnWidth: 140
  514. },
  515. {
  516. userId: this.$store.state.user.name,
  517. functionId: 103001,
  518. serialNumber: '103001Table2FileRemark',
  519. tableId: '103001Table2',
  520. tableName: '文件信息表',
  521. columnProp: 'fileRemark',
  522. headerAlign: 'center',
  523. align: 'center',
  524. columnLabel: '备注',
  525. columnHidden: false,
  526. columnImage: false,
  527. columnSortable: false,
  528. sortLv: 0,
  529. status: true,
  530. fixed: '',
  531. columnWidth: 240
  532. },
  533. // {
  534. // userId: this.$store.state.user.name,
  535. // functionId: 103001,
  536. // serialNumber: '103001Table2OrderRef3',
  537. // tableId: '103001Table2',
  538. // tableName: '文件信息表',
  539. // columnProp: 'orderRef3',
  540. // headerAlign: 'center',
  541. // align: 'center',
  542. // columnLabel: '文件描述',
  543. // columnHidden: false,
  544. // columnImage: false,
  545. // columnSortable: false,
  546. // sortLv: 0,
  547. // status: true,
  548. // fixed: '',
  549. // columnWidth: 120
  550. // },
  551. {
  552. userId: this.$store.state.user.name,
  553. functionId: 103001,
  554. serialNumber: '103001Table2CreateDate',
  555. tableId: '103001Table2',
  556. tableName: '文件信息表',
  557. columnProp: 'createDate',
  558. headerAlign: 'center',
  559. align: 'center',
  560. columnLabel: '上传时间',
  561. columnHidden: false,
  562. columnImage: false,
  563. columnSortable: false,
  564. sortLv: 0,
  565. status: true,
  566. fixed: '',
  567. columnWidth: 140
  568. },
  569. {
  570. userId: this.$store.state.user.name,
  571. functionId: 103001,
  572. serialNumber: '103001Table2CreatedBy',
  573. tableId: '103001Table2',
  574. tableName: '文件信息表',
  575. columnProp: 'createBy',
  576. headerAlign: 'center',
  577. align: 'center',
  578. columnLabel: '上传人',
  579. columnHidden: false,
  580. columnImage: false,
  581. columnSortable: false,
  582. sortLv: 0,
  583. status: true,
  584. fixed: '',
  585. columnWidth: 140
  586. }
  587. ],
  588. // 导出 end
  589. columnList1: [
  590. {
  591. userId: this.$store.state.user.name,
  592. functionId: 106002,
  593. serialNumber: '106002Table1Site',
  594. tableId: "106002Table1",
  595. tableName: "刀具申请主表",
  596. columnProp: "site",
  597. headerAlign: "center",
  598. align: "left",
  599. columnLabel: "工厂编码",
  600. columnHidden: false,
  601. columnImage: false,
  602. columnSortable: false,
  603. sortLv: 0,
  604. status: true,
  605. fixed: '',
  606. columnWidth: 70
  607. },
  608. {
  609. userId: this.$store.state.user.name,
  610. functionId: 106002,
  611. serialNumber: '106002Table1DepartmentDesc',
  612. tableId: "106002Table1",
  613. tableName: "刀具申请主表",
  614. columnProp: "departmentDesc",
  615. headerAlign: "center",
  616. align: "left",
  617. columnLabel: "部门",
  618. columnHidden: false,
  619. columnImage: false,
  620. columnSortable: false,
  621. sortLv: 0,
  622. status: true,
  623. fixed: '',
  624. columnWidth: 70
  625. },
  626. {
  627. userId: this.$store.state.user.name,
  628. functionId: 106002,
  629. serialNumber: '106002Table1ApplyNo',
  630. tableId: "106002Table1",
  631. tableName: "刀具申请主表",
  632. columnProp: "applyNo",
  633. headerAlign: "center",
  634. align: "left",
  635. columnLabel: "申请单号",
  636. columnHidden: false,
  637. columnImage: false,
  638. columnSortable: false,
  639. sortLv: 0,
  640. status: true,
  641. fixed: '',
  642. columnWidth: 80
  643. },
  644. {
  645. userId: this.$store.state.user.name,
  646. functionId: 106002,
  647. serialNumber: '106002Table1ApplyBy',
  648. tableId: "106002Table1",
  649. tableName: "刀具申请主表",
  650. columnProp: "applyBy",
  651. headerAlign: "center",
  652. align: "left",
  653. columnLabel: "申请人",
  654. columnHidden: false,
  655. columnImage: false,
  656. columnSortable: false,
  657. sortLv: 0,
  658. status: true,
  659. fixed: '',
  660. columnWidth: 60
  661. },
  662. {
  663. userId: this.$store.state.user.name,
  664. functionId: 106002,
  665. serialNumber: '106002Table1Status',
  666. tableId: "106002Table1",
  667. tableName: "刀具申请主表",
  668. columnProp: "status",
  669. headerAlign: "center",
  670. align: "left",
  671. columnLabel: "状态",
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. sortLv: 0,
  676. status: true,
  677. fixed: '',
  678. columnWidth: 60
  679. },
  680. {
  681. userId: this.$store.state.user.name,
  682. functionId: 106002,
  683. serialNumber: '106002Table1QuoterName',
  684. tableId: "106002Table1",
  685. tableName: "刀具申请主表",
  686. columnProp: "quoterName",
  687. headerAlign: "center",
  688. align: "left",
  689. columnLabel: "报价员",
  690. columnHidden: false,
  691. columnImage: false,
  692. columnSortable: false,
  693. sortLv: 0,
  694. status: true,
  695. fixed: '',
  696. columnWidth: 60
  697. },
  698. {
  699. userId: this.$store.state.user.name,
  700. functionId: 106002,
  701. serialNumber: '106002Table1TpName',
  702. tableId: "106002Table1",
  703. tableName: "刀具申请主表",
  704. columnProp: "tpName",
  705. headerAlign: "center",
  706. align: "left",
  707. columnLabel: "TP",
  708. columnHidden: false,
  709. columnImage: false,
  710. columnSortable: false,
  711. sortLv: 0,
  712. status: true,
  713. fixed: '',
  714. columnWidth: 60
  715. },
  716. {
  717. userId: this.$store.state.user.name,
  718. functionId: 106002,
  719. serialNumber: '106002Table1PurchaserName',
  720. tableId: "106002Table1",
  721. tableName: "刀具申请主表",
  722. columnProp: "purchaserName",
  723. headerAlign: "center",
  724. align: "left",
  725. columnLabel: "采购员",
  726. columnHidden: false,
  727. columnImage: false,
  728. columnSortable: false,
  729. sortLv: 0,
  730. status: true,
  731. fixed: '',
  732. columnWidth: 60
  733. },
  734. {
  735. userId: this.$store.state.user.name,
  736. functionId: 106002,
  737. serialNumber: '106002Table1ApplyDate',
  738. tableId: "106002Table1",
  739. tableName: "刀具申请主表",
  740. columnProp: "applyDate",
  741. headerAlign: "center",
  742. align: "left",
  743. columnLabel: "申请日期",
  744. columnHidden: false,
  745. columnImage: false,
  746. columnSortable: false,
  747. sortLv: 0,
  748. status: true,
  749. fixed: '',
  750. columnWidth: 80
  751. },
  752. {
  753. userId: this.$store.state.user.name,
  754. functionId: 106002,
  755. serialNumber: '106002Table1ApplyReason',
  756. tableId: "106002Table1",
  757. tableName: "刀具申请主表",
  758. columnProp: "applyReason",
  759. headerAlign: "center",
  760. align: "left",
  761. columnLabel: "申请原因",
  762. columnHidden: false,
  763. columnImage: false,
  764. columnSortable: false,
  765. sortLv: 0,
  766. status: true,
  767. fixed: '',
  768. columnWidth: 150
  769. },
  770. {
  771. userId: this.$store.state.user.name,
  772. functionId: 106002,
  773. serialNumber: '106002Table1Remark',
  774. tableId: "106002Table1",
  775. tableName: "刀具申请主表",
  776. columnProp: "remark",
  777. headerAlign: "center",
  778. align: "left",
  779. columnLabel: "申请备注",
  780. columnHidden: false,
  781. columnImage: false,
  782. columnSortable: false,
  783. sortLv: 0,
  784. status: true,
  785. fixed: '',
  786. columnWidth: 200
  787. },
  788. ],
  789. columnList2: [
  790. {
  791. userId: this.$store.state.user.name,
  792. functionId: 106002,
  793. serialNumber: '106002Table2SeqNo',
  794. tableId: '106002Table2',
  795. tableName: '工具申请明细',
  796. columnProp: 'seqNo',
  797. headerAlign: 'center',
  798. align: 'center',
  799. columnLabel: '序号',
  800. columnHidden: false,
  801. columnImage: false,
  802. columnSortable: false,
  803. sortLv: 0,
  804. status: true,
  805. fixed: '',
  806. columnWidth: 40
  807. },
  808. {
  809. userId: this.$store.state.user.name,
  810. functionId: 106002,
  811. serialNumber: '106002Table2QuotationNo',
  812. tableId: '106002Table2',
  813. tableName: '工具申请明细',
  814. columnProp: 'orderRef1',
  815. headerAlign: 'center',
  816. align: 'center',
  817. columnLabel: '项目编码',
  818. columnHidden: false,
  819. columnImage: false,
  820. columnSortable: false,
  821. sortLv: 0,
  822. status: true,
  823. fixed: '',
  824. columnWidth: 100
  825. },
  826. {
  827. userId: this.$store.state.user.name,
  828. functionId: 106002,
  829. serialNumber: '106002Table2ToolNo',
  830. tableId: '106002Table2',
  831. tableName: '工具申请明细',
  832. columnProp: 'toolId',
  833. headerAlign: 'center',
  834. align: 'center',
  835. columnLabel: '工具编码',
  836. columnHidden: false,
  837. columnImage: false,
  838. columnSortable: false,
  839. sortLv: 0,
  840. status: true,
  841. fixed: '',
  842. columnWidth: 70
  843. },
  844. {
  845. userId: this.$store.state.user.name,
  846. functionId: 106002,
  847. serialNumber: '106002Table2ToolDescription',
  848. tableId: '106002Table2',
  849. tableName: '工具申请明细',
  850. columnProp: 'toolDesc',
  851. headerAlign: 'center',
  852. align: 'center',
  853. columnLabel: '工具描述',
  854. columnHidden: false,
  855. columnImage: false,
  856. columnSortable: false,
  857. sortLv: 0,
  858. status: true,
  859. fixed: '',
  860. columnWidth: 120
  861. },
  862. {
  863. userId: this.$store.state.user.name,
  864. functionId: 106002,
  865. serialNumber: '106002Table2ApplyQty',
  866. tableId: '106002Table2',
  867. tableName: '工具申请明细',
  868. columnProp: 'applyQty',
  869. headerAlign: 'center',
  870. align: 'center',
  871. columnLabel: '申请数量',
  872. columnHidden: false,
  873. columnImage: false,
  874. columnSortable: false,
  875. sortLv: 0,
  876. status: true,
  877. fixed: '',
  878. columnWidth: 80
  879. },
  880. {
  881. userId: this.$store.state.user.name,
  882. functionId: 106002,
  883. serialNumber: '106002Table2UnitCost',
  884. tableId: '106002Table2',
  885. tableName: '工具申请明细',
  886. columnProp: 'standardCost',
  887. headerAlign: 'center',
  888. align: 'center',
  889. columnLabel: '工具成本',
  890. columnHidden: false,
  891. columnImage: false,
  892. columnSortable: false,
  893. sortLv: 0,
  894. status: true,
  895. fixed: '',
  896. columnWidth: 60
  897. },
  898. {
  899. userId: this.$store.state.user.name,
  900. functionId: 106002,
  901. serialNumber: '106002Table2QuotationNo',
  902. tableId: '106002Table2',
  903. tableName: '工具申请明细',
  904. columnProp: 'orderRef2',
  905. headerAlign: 'center',
  906. align: 'center',
  907. columnLabel: '物料编码',
  908. columnHidden: false,
  909. columnImage: false,
  910. columnSortable: false,
  911. sortLv: 0,
  912. status: true,
  913. fixed: '',
  914. columnWidth: 70
  915. }, {
  916. userId: this.$store.state.user.name,
  917. functionId: 106002,
  918. serialNumber: '106002Table2QuotationNo',
  919. tableId: '106002Table2',
  920. tableName: '工具申请明细',
  921. columnProp: 'orderRef3',
  922. headerAlign: 'center',
  923. align: 'center',
  924. columnLabel: '工艺路线版本',
  925. columnHidden: false,
  926. columnImage: false,
  927. columnSortable: false,
  928. sortLv: 0,
  929. status: true,
  930. fixed: '',
  931. columnWidth: 70
  932. },
  933. {
  934. userId: this.$store.state.user.name,
  935. functionId: 106002,
  936. serialNumber: '106002Table2QuotationNo',
  937. tableId: '106002Table2',
  938. tableName: '工具申请明细',
  939. columnProp: 'orderRef5',
  940. headerAlign: 'center',
  941. align: 'center',
  942. columnLabel: '替代编码',
  943. columnHidden: false,
  944. columnImage: false,
  945. columnSortable: false,
  946. sortLv: 0,
  947. status: true,
  948. fixed: '',
  949. columnWidth: 70
  950. },{
  951. userId: this.$store.state.user.name,
  952. functionId: 106002,
  953. serialNumber: '106002Table2QuotationNo',
  954. tableId: '106002Table2',
  955. tableName: '工具申请明细',
  956. columnProp: 'operationNo',
  957. headerAlign: 'center',
  958. align: 'center',
  959. columnLabel: '工序号',
  960. columnHidden: false,
  961. columnImage: false,
  962. columnSortable: false,
  963. sortLv: 0,
  964. status: true,
  965. fixed: '',
  966. columnWidth: 70
  967. },{
  968. userId: this.$store.state.user.name,
  969. functionId: 106002,
  970. serialNumber: '106002Table2QuotationNo',
  971. tableId: '106002Table2',
  972. tableName: '工具申请明细',
  973. columnProp: 'operationName',
  974. headerAlign: 'center',
  975. align: 'center',
  976. columnLabel: '工序',
  977. columnHidden: false,
  978. columnImage: false,
  979. columnSortable: false,
  980. sortLv: 0,
  981. status: true,
  982. fixed: '',
  983. columnWidth: 70
  984. },
  985. ],
  986. columnFileContentArray: [
  987. {
  988. columnProp: 'fileName',
  989. headeralign: 'left',
  990. align: 'left',
  991. columnLabel: '文件名称',
  992. columnHidden: false,
  993. columnImage: false,
  994. columnSortable: false,
  995. sortLv: 0,
  996. status: true,
  997. fixed: false
  998. // }, {
  999. // columnProp: 'createdBy',
  1000. // headeralign: 'left',
  1001. // align: 'left',
  1002. // columnLabel: '上传人',
  1003. // columnHidden: false,
  1004. // columnImage: false,
  1005. // columnSortable: true,
  1006. // sortLv: 0,
  1007. // status: true,
  1008. // fixed: false
  1009. }, {
  1010. columnProp: 'createDate',
  1011. headeralign: 'left',
  1012. align: 'left',
  1013. columnLabel: '上传时间',
  1014. columnHidden: false,
  1015. columnImage: false,
  1016. columnSortable: true,
  1017. sortLv: 0,
  1018. status: true,
  1019. fixed: false
  1020. }, {
  1021. columnProp: 'orderRef3',
  1022. headeralign: 'left',
  1023. align: 'left',
  1024. columnLabel: '类型',
  1025. columnHidden: false,
  1026. columnImage: false,
  1027. columnSortable: true,
  1028. sortLv: 0,
  1029. status: true,
  1030. fixed: false
  1031. },
  1032. ],
  1033. approvalList: [],
  1034. rejectOpinion: '',
  1035. submitModalFlag: false,
  1036. }
  1037. },
  1038. watch: {
  1039. // columnList1: {
  1040. // deep: true,
  1041. // handler: function (newV, oldV) {
  1042. // debugger
  1043. //
  1044. // }
  1045. // }
  1046. },
  1047. mounted() {
  1048. this.$nextTick(() => {
  1049. this.height = window.innerHeight - 520;
  1050. })
  1051. },
  1052. methods: {
  1053. // 查询审批信息
  1054. getApprovalList () {
  1055. if (Object.keys(this.currentRow).length !== 0) {
  1056. let tempData = {
  1057. site: this.$store.state.user.site,
  1058. menuId: this.$route.meta.menuId,
  1059. documentNo: this.currentRow.applyNo
  1060. }
  1061. getApprovalList(tempData).then(({data}) => {
  1062. if (data && data.code === 0) {
  1063. this.approvalList = data.rows
  1064. } else {
  1065. this.approvalList = []
  1066. }
  1067. })
  1068. }
  1069. },
  1070. // 获取基础数据列表S
  1071. getBaseList (val, type) {
  1072. this.tagNo = val
  1073. this.tagNo2 = type
  1074. this.$nextTick(() => {
  1075. let strVal = ''
  1076. if (val === 103) {
  1077. if(type==1) {
  1078. strVal = this.dataForm.quoter
  1079. }
  1080. if(type==2) {
  1081. strVal = this.dataForm.tp
  1082. }
  1083. if(type==3) {
  1084. strVal = this.dataForm.purchaser
  1085. }
  1086. }
  1087. this.$refs.baseList.init(val, strVal)
  1088. })
  1089. },
  1090. /* 列表方法的回调 */
  1091. getBaseData (val) {
  1092. if (this.tagNo === 103) {
  1093. if(this.tagNo2==1) {
  1094. this.dataForm.quoter = val.username
  1095. this.dataForm.quoterName = val.user_display
  1096. this.$nextTick(() => {
  1097. this.$triggerInputEvent(this.$refs.quoterName);
  1098. });
  1099. }
  1100. if(this.tagNo2==2) {
  1101. this.dataForm.tp = val.username
  1102. this.dataForm.tpName = val.user_display
  1103. this.$nextTick(() => {
  1104. this.$triggerInputEvent(this.$refs.tpName);
  1105. });
  1106. }
  1107. if(this.tagNo2==3) {
  1108. this.dataForm.purchaser = val.username
  1109. this.dataForm.purchaserName = val.user_display
  1110. this.$nextTick(() => {
  1111. this.$triggerInputEvent(this.$refs.purchaserName);
  1112. });
  1113. }
  1114. }
  1115. },
  1116. //导出excel
  1117. async createExportData() {
  1118. this.searchData.limit = -1
  1119. this.searchData.page = 1
  1120. await searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1121. this.exportList= data.page.list;
  1122. })
  1123. return this.exportList;
  1124. },
  1125. startDownload() {
  1126. // this.exportData = this.dataList
  1127. },
  1128. finishDownload() {
  1129. },
  1130. fields() {
  1131. let json = "{"
  1132. this.columnList1.forEach((item, index) => {
  1133. if (index == this.columnList1.length - 1) {
  1134. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1135. } else {
  1136. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1137. }
  1138. })
  1139. json += "}"
  1140. let s = eval("(" + json + ")")
  1141. return s
  1142. },
  1143. //导出excel
  1144. async createExportData2() {
  1145. return this.contactList;
  1146. },
  1147. startDownload2() {
  1148. // this.exportData = this.dataList
  1149. },
  1150. finishDownload2() {
  1151. },
  1152. fields2() {
  1153. let json = "{"
  1154. this.columnList2.forEach((item, index) => {
  1155. if (index == this.columnList2.length - 1) {
  1156. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1157. } else {
  1158. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1159. }
  1160. })
  1161. json += "}"
  1162. let s = eval("(" + json + ")")
  1163. return s
  1164. },
  1165. // 导出 end
  1166. // 获取数据列表
  1167. search () {
  1168. this.searchData.limit = this.pageSize
  1169. this.searchData.page = this.pageIndex
  1170. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1171. if (data.code == 0) {
  1172. this.dataList1 = data.page.list
  1173. this.pageIndex = data.page.currPage
  1174. this.pageSize = data.page.pageSize
  1175. this.totalPage = data.page.totalCount
  1176. if(this.dataList1.length>0){
  1177. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1178. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  1179. }else {
  1180. this.currentRow ={}
  1181. }
  1182. this.refreshCurrentTabTable ()
  1183. }
  1184. this.dataListLoading = false
  1185. })
  1186. },
  1187. //单击切换订单
  1188. changeData(row) {
  1189. this.currentRow = JSON.parse(JSON.stringify(row));
  1190. this.currentRow2 = row;
  1191. this.refreshCurrentTabTable ();
  1192. },
  1193. addUploadFileModal(){
  1194. let currentData = {
  1195. site: this.currentRow.site,
  1196. createBy: this.$store.state.user.name,
  1197. projectId: this.currentRow.applyNo,
  1198. projectName: '',
  1199. remark: '',
  1200. };
  1201. //打开组件 去做新增业务
  1202. this.$nextTick(() => {
  1203. this.$refs.projectUploadFile.init(currentData);
  1204. })
  1205. },
  1206. deleteFile(row){
  1207. this.$confirm('确定要删除此文件?', '提示', {
  1208. confirmButtonText: '确定',
  1209. cancelButtonText: '取消',
  1210. type: 'warning'
  1211. }).then(() => {
  1212. deleteProjectFile(row).then(({data}) => {
  1213. if (data && data.code == 0) {
  1214. this.getFileContentData();
  1215. this.$message({
  1216. message: '操作成功',
  1217. type: 'success',
  1218. duration: 1500,
  1219. onClose: () => {
  1220. }
  1221. })
  1222. } else {
  1223. this.$alert(data.msg, '错误', {
  1224. confirmButtonText: '确定'
  1225. })
  1226. }
  1227. })
  1228. }).catch(() => {
  1229. })
  1230. },
  1231. tabClick (tab, event) {
  1232. // 刷新列表数据
  1233. this.refreshCurrentTabTable()
  1234. },
  1235. // 刷新页签的table数据
  1236. refreshCurrentTabTable () {
  1237. if (this.activeName == 'detail') {
  1238. this.searchToolApplyDetail();
  1239. }
  1240. if (this.activeName == 'down') {
  1241. // this.getFileContentData();
  1242. }
  1243. if (this.activeName === 'approvalInformation') {
  1244. this.getApprovalList()
  1245. }
  1246. },
  1247. searchToolApplyDetail(){
  1248. if(this.currentRow.applyNo){
  1249. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  1250. if (data.code == 0) {
  1251. this.detailList = data.rows
  1252. }
  1253. })
  1254. }else {
  1255. this.detailList =[]
  1256. }
  1257. },
  1258. editModal (row) {
  1259. this.dataForm = {
  1260. site: row.site,
  1261. applyNo: row.applyNo,
  1262. applyBy: row.applyBy,
  1263. applyDate: row.applyDate,
  1264. applySumQty: row.applySumQty,
  1265. applyReason: row.applyReason,
  1266. remark: row.remark,
  1267. createBy: row.createBy,
  1268. department:row.department,
  1269. detailList: [],
  1270. status: row.status,
  1271. rejectOpinion: '',
  1272. nodeConclusion: '',
  1273. quoter: row.quoter,
  1274. quoterName: row.quoterName,
  1275. tp: row.tp,
  1276. tpName: row.tpName,
  1277. purchaser: row.purchaser,
  1278. purchaserName: row.purchaserName,
  1279. menuId: this.$route.meta.menuId,
  1280. userName: this.$store.state.user.name,
  1281. }
  1282. searchProjectToolApplyDetail({ site: row.site,
  1283. applyNo: row.applyNo,}).then(({data}) => {
  1284. if (data.code == 0) {
  1285. this.toolData = data.rows
  1286. }
  1287. })
  1288. this.visible=true
  1289. },
  1290. comfirmApply (row) {
  1291. this.$confirm(`确定下达这个申请`, '提示', {
  1292. confirmButtonText: '确定',
  1293. cancelButtonText: '取消',
  1294. type: 'warning'
  1295. }).then(() => {
  1296. let tempData = {
  1297. site: row.site,
  1298. userName: this.$store.state.user.name,
  1299. applyNo: row.applyNo,
  1300. menuId: this.$route.meta.menuId
  1301. }
  1302. comfirmProjectToolApply(tempData).then(({data}) => {
  1303. if (data && data.code === 0) {
  1304. row.statusCode = '10'
  1305. row.status = '下达'
  1306. this.$message({
  1307. message: '操作成功',
  1308. type: 'success',
  1309. duration: 1500,
  1310. onClose: () => {}
  1311. })
  1312. } else {
  1313. this.$alert(data.msg, '错误', {
  1314. confirmButtonText: '确定'
  1315. })
  1316. }
  1317. })
  1318. })
  1319. },
  1320. cancelApply(row){
  1321. this.$confirm(`确定取消这个申请`, '提示', {
  1322. confirmButtonText: '确定',
  1323. cancelButtonText: '取消',
  1324. type: 'warning'
  1325. }).then(() => {
  1326. cancelProjectToolApply(row).then(({data}) => {
  1327. if (data && data.code === 0) {
  1328. this.search();
  1329. this.$message({
  1330. message: '操作成功',
  1331. type: 'success',
  1332. duration: 1500,
  1333. onClose: () => {
  1334. }
  1335. })
  1336. } else {
  1337. this.$alert(data.msg, '错误', {
  1338. confirmButtonText: '确定'
  1339. })
  1340. }
  1341. })
  1342. })
  1343. },
  1344. //刷新派设备文档的列表
  1345. getFileContentData() {
  1346. let currentData = {orderRef2: this.currentRow.applyNo};
  1347. getFileContentList(currentData).then(({data}) => {
  1348. //区分请求成功和失败的状况
  1349. if (data && data.code == 200) {
  1350. this.fileContentList = data.rows;
  1351. } else {
  1352. this.fileContentList = [];
  1353. }
  1354. });
  1355. },
  1356. // 下载
  1357. downloadFile(row){
  1358. // let inData={
  1359. // site:this.currentRow.site,
  1360. // username:this.$store.state.user.name,
  1361. // projectId:this.currentRow.projectId
  1362. // }
  1363. // getProjectUserRole(inData).then(({data}) => {
  1364. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1365. downLoadProjectFile(row)
  1366. .then(({data}) => {
  1367. // 不限制文件下载类型
  1368. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1369. // 下载文件名称
  1370. const fileName = row.fileName
  1371. // a标签下载
  1372. const linkNode = document.createElement('a')
  1373. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1374. linkNode.style.display = 'none'
  1375. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1376. console.log(linkNode)
  1377. // if(val == 'Y'){
  1378. // this.pdfVisible = true
  1379. // this.pdfUrl = linkNode.href
  1380. // }else {
  1381. document.body.appendChild(linkNode)
  1382. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1383. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1384. document.body.removeChild(linkNode)
  1385. // }
  1386. })
  1387. // }else {
  1388. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  1389. // confirmButtonText: '确定'
  1390. // })
  1391. // }
  1392. // })
  1393. },
  1394. // 每页数
  1395. sizeChangeHandle (val) {
  1396. this.pageSize = val
  1397. this.pageIndex = 1
  1398. this.search()
  1399. },
  1400. // 当前页
  1401. currentChangeHandle (val) {
  1402. this.pageIndex = val
  1403. this.search()
  1404. },
  1405. openMassageModel(){
  1406. if(Object.keys(this.currentRow).length === 0){
  1407. this.$alert('未选择记录!', '错误', {
  1408. confirmButtonText: '确定'
  1409. })
  1410. return false;
  1411. }
  1412. this.modelData={
  1413. site:this.currentRow.site,
  1414. applyNo:this.currentRow.applyNo,
  1415. prNo:this.currentRow.prNo,
  1416. remark1:this.currentRow.remark1,
  1417. poNo:this.currentRow.poNo,
  1418. supplierName:this.currentRow.supplierName,
  1419. allCost:this.currentRow.allCost,
  1420. remark2:this.currentRow.remark2,
  1421. }
  1422. this.modelFlag=true
  1423. },
  1424. changeSum() {
  1425. this.dataForm.applySumQty = 0
  1426. for (const item of this.toolData) {
  1427. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  1428. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
  1429. }
  1430. },
  1431. saveHeaderMessage(){
  1432. this.$confirm('确定是否保存','提示',{
  1433. confirmButtonText:'确定',
  1434. cancelButtonText:'取消',
  1435. type:'warning'
  1436. }).then(()=>{
  1437. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1438. if (data && data.code == 0) {
  1439. this.modelFlag=false;
  1440. this.currentRow.prNo=this.modelData.prNo
  1441. this.currentRow.remark1=this.modelData.remark1
  1442. this.currentRow.poNo=this.modelData.poNo
  1443. this.currentRow.supplierName=this.modelData.supplierName
  1444. this.currentRow.allCost=this.modelData.allCost
  1445. this.currentRow.remark2=this.modelData.remark2
  1446. this.currentRow2.prNo=this.modelData.prNo
  1447. this.currentRow2.remark1=this.modelData.remark1
  1448. this.currentRow2.poNo=this.modelData.poNo
  1449. this.currentRow2.supplierName=this.modelData.supplierName
  1450. this.currentRow2.allCost=this.modelData.allCost
  1451. this.currentRow2.remark2=this.modelData.remark2
  1452. this.$message({
  1453. message: '操作成功',
  1454. type: 'success',
  1455. duration: 1500,
  1456. onClose: () => {
  1457. }
  1458. })
  1459. } else {
  1460. this.$alert(data.msg, '错误', {
  1461. confirmButtonText: '确定'
  1462. })
  1463. }
  1464. })
  1465. })
  1466. },
  1467. // 同意提交
  1468. agreeSubmit () {
  1469. this.$confirm(`是否确认提交?`, '提示', {
  1470. confirmButtonText: '确定',
  1471. cancelButtonText: '取消',
  1472. type: 'warning'
  1473. }).then(() => {
  1474. this.dataForm.nodeConclusion = 'Y'
  1475. this.submitData()
  1476. })
  1477. },
  1478. // 打开提交模态框
  1479. submitDataModal () {
  1480. this.rejectOpinion = ''
  1481. this.submitModalFlag = true
  1482. },
  1483. // 驳回提交
  1484. rejectSubmit () {
  1485. this.$confirm(`是否确认驳回?`, '提示', {
  1486. confirmButtonText: '确定',
  1487. cancelButtonText: '取消',
  1488. type: 'warning'
  1489. }).then(() => {
  1490. this.dataForm.rejectOpinion = this.rejectOpinion
  1491. this.dataForm.nodeConclusion = 'N'
  1492. this.submitData()
  1493. })
  1494. },
  1495. // 提交
  1496. submitData () {
  1497. this.dataForm.userName = this.$store.state.user.name
  1498. this.dataForm.menuId = this.$route.meta.menuId
  1499. this.dataForm.detailList = this.toolData
  1500. submitChange(this.dataForm).then(({data}) => {
  1501. if (data && data.code === 0) {
  1502. for (let i = 0; i <this.dataList1.length ; i++) {
  1503. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1504. this.dataList1[i].remark = this.dataForm.remark
  1505. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1506. this.dataList1[i].applyReason = this.dataForm.applyReason
  1507. }
  1508. }
  1509. this.refreshCurrentTabTable()
  1510. this.submitModalFlag = false
  1511. this.visible = false
  1512. this.$message({
  1513. message: '操作成功',
  1514. type: 'success',
  1515. duration: 1500,
  1516. onClose: () => {
  1517. }
  1518. })
  1519. } else {
  1520. this.$alert(data.msg, '错误', {
  1521. confirmButtonText: '确定'
  1522. })
  1523. }
  1524. })
  1525. },
  1526. saveData () {
  1527. this.dataForm.detailList = this.toolData
  1528. editToolApplication(this.dataForm).then(({data}) => {
  1529. if (data && data.code === 0) {
  1530. for (let i = 0; i <this.dataList1.length ; i++) {
  1531. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1532. this.dataList1[i].remark = this.dataForm.remark
  1533. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1534. this.dataList1[i].applyReason = this.dataForm.applyReason
  1535. this.dataList1[i].quoter = this.dataForm.quoter
  1536. this.dataList1[i].tp = this.dataForm.tp
  1537. this.dataList1[i].purchaser = this.dataForm.purchaser
  1538. this.dataList1[i].quoterName = this.dataForm.quoterName
  1539. this.dataList1[i].tpName = this.dataForm.tpName
  1540. this.dataList1[i].purchaserName = this.dataForm.purchaserName
  1541. }
  1542. }
  1543. this.visible = false
  1544. this.refreshCurrentTabTable()
  1545. this.$message({
  1546. message: '操作成功',
  1547. type: 'success',
  1548. duration: 1500,
  1549. onClose: () => {
  1550. }
  1551. })
  1552. } else {
  1553. this.$alert(data.msg, '错误', {
  1554. confirmButtonText: '确定'
  1555. })
  1556. }
  1557. })
  1558. },
  1559. jumpBM(row){
  1560. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){
  1561. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  1562. }else {
  1563. let inData={
  1564. site:row.site,
  1565. testPartNo:row.orderRef2
  1566. }
  1567. getProjectPartNowBm(inData).then(({data}) => {
  1568. //区分请求成功和失败的状况
  1569. if (data && data.code == 0) {
  1570. if(data.rows==null||data.rows.length==0){
  1571. this.$alert('该物料没有benchmark', '警告', {confirmButtonText: '确定',});
  1572. }
  1573. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:data.rows[0].nowBm},})
  1574. } else {
  1575. }
  1576. });
  1577. }
  1578. },
  1579. },
  1580. activated() {
  1581. },
  1582. }
  1583. </script>
  1584. <style >
  1585. .el-transfer-panel {
  1586. border: 2px solid #17b3a3;
  1587. border-radius: 4px;
  1588. overflow: hidden;
  1589. background: #fff;
  1590. display: inline-block;
  1591. vertical-align: middle;
  1592. width: 200px;
  1593. max-height: 100%;
  1594. -webkit-box-sizing: border-box;
  1595. box-sizing: border-box;
  1596. position: relative;
  1597. }
  1598. .el-transfer-panel .el-transfer-panel__header {
  1599. height: 40px;
  1600. line-height: 40px;
  1601. background: #17b3a3;
  1602. margin: 0;
  1603. padding-left: 15px;
  1604. border-bottom: 1px solid #17b3a3;
  1605. -webkit-box-sizing: border-box;
  1606. box-sizing: border-box;
  1607. color: #000;
  1608. }
  1609. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1610. font-size: 14px;
  1611. color: #303133;
  1612. font-weight: 400;
  1613. }
  1614. </style>