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.

1794 lines
62 KiB

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