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.

3717 lines
125 KiB

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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'打样单号'">
  6. <el-input v-model="searchData.proofingNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户编码'">
  9. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'客户名称'">
  12. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'CS'">
  15. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'物料编码'">
  18. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'物料名称'">
  21. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'要求交付日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item label=" ">
  33. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  46. <el-form-item label="BU">
  47. <bu-select v-model="searchData.buNo" style="width: 120px"></bu-select>
  48. </el-form-item>
  49. <el-form-item :label="'项目编码'">
  50. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'项目名称'">
  53. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  54. </el-form-item>
  55. <el-form-item :label="'NPI工程师'">
  56. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  57. </el-form-item>
  58. <el-form-item :label="'IFS物料编码'">
  59. <el-input v-model="searchData.finalPartNo" clearable style="width: 120px"></el-input>
  60. </el-form-item>
  61. <el-form-item :label="'客户物料编码'">
  62. <el-input v-model="searchData.customerPartNo" clearable style="width: 120px"></el-input>
  63. </el-form-item>
  64. <el-form-item :label="'优先等级'">
  65. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"></dict-data-select>
  66. </el-form-item>
  67. <el-form-item :label="'状态'">
  68. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  69. <el-option label="全部" value=""></el-option>
  70. <el-option label="草稿" value="草稿"></el-option>
  71. <el-option label="审批中" value="审批中"></el-option>
  72. <el-option label="已完成" value="已完成"></el-option>
  73. </el-select>
  74. </el-form-item>
  75. <el-form-item :label="' '">
  76. <el-button @click="getDataList()">查询</el-button>
  77. <el-button type="primary" @click="addModal()">新增</el-button>
  78. <el-button type="primary" @click="delModal()">删除</el-button>
  79. <download-excel
  80. :fields="fields()"
  81. :data="exportData"
  82. type="xls"
  83. :name="exportName"
  84. :header="exportHeader"
  85. :footer="exportFooter"
  86. :fetch="createExportData"
  87. :before-generate="startDownload"
  88. :before-finish="finishDownload"
  89. worksheet="导出信息"
  90. class="el-button el-button--primary el-button--medium">
  91. {{ "导出" }}
  92. </download-excel>
  93. </el-form-item>
  94. </el-form>
  95. <!-- 打样列表 -->
  96. <el-table
  97. :height="height"
  98. :data="dataList"
  99. border
  100. :row-style="rowStyle"
  101. ref="proofingTable"
  102. @row-click="proofingClickRow"
  103. @selection-change="selectionProofing"
  104. @current-change="changeCurrentRow"
  105. v-loading="dataListLoading"
  106. style="width: 100%;">
  107. <el-table-column
  108. type="selection"
  109. header-align="center"
  110. align="center"
  111. :selectable="selectFlag"
  112. width="50">
  113. </el-table-column>
  114. <el-table-column
  115. v-for="(item,index) in columnList" :key="index"
  116. :sortable="item.columnSortable"
  117. :prop="item.columnProp"
  118. :header-align="item.headerAlign"
  119. :show-overflow-tooltip="item.showOverflowTooltip"
  120. :align="item.align"
  121. :fixed="item.fixed === ''?false:item.fixed"
  122. :min-width="item.columnWidth"
  123. :label="item.columnLabel">
  124. <template slot-scope="scope">
  125. <div v-if="item.columnProp === 'proofingResultStatus'">
  126. <span v-if="!item.columnHidden">
  127. <span v-show="scope.row.proofingResultStatus === 'B'">草稿</span>
  128. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  129. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  130. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  131. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  132. </span>
  133. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  134. style="width: 100px; height: 80px"/></span>
  135. </div>
  136. <div v-else>
  137. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  138. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  139. style="width: 100px; height: 80px"/></span>
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. fixed="right"
  145. header-align="center"
  146. align="center"
  147. width="100"
  148. label="操作">
  149. <template slot-scope="scope">
  150. <el-link style="cursor: pointer" @click="updateModal(scope.row)" v-if="scope.row.proofingStatus !== '已完成'">
  151. 编辑
  152. </el-link>
  153. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '草稿'"
  154. @click="updateModalStatus(scope.row,'C')">下达
  155. </el-link>
  156. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '已完成'" @click="getDetailData(scope.row)">
  157. 详情
  158. </el-link>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <selectDiv ref="selectDiv"></selectDiv>
  163. <!-- 分页插件 -->
  164. <el-pagination style="margin-top: 0px"
  165. @size-change="sizeChangeHandle"
  166. @current-change="currentChangeHandle"
  167. :current-page="pageIndex"
  168. :page-sizes="[20, 50, 100, 200, 500]"
  169. :page-size="pageSize"
  170. :total="totalPage"
  171. layout="total, sizes, prev, pager, next, jumper">
  172. </el-pagination>
  173. <!-- 打样模态框 -->
  174. <el-dialog :title="modalData.title" @close="closeModalDiaLog" @open="openModalDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" top="10vh" width="1200px">
  175. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules">
  176. <el-row :gutter="15">
  177. <el-col :span="8">
  178. <el-row :gutter="10">
  179. <el-col :span="10">
  180. <el-form-item prop="customerNo" label="客户编码" :show-message="false">
  181. <span style="cursor: pointer" slot="label" v-if="modalData.flag === '1'"
  182. @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  183. <el-input :disabled="modalData.flag !== '1' && columnFlagByHeader('customerNo')"
  184. v-model="modalData.customerNo" @blur="handleQueryCustomer"></el-input>
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="14">
  188. <el-form-item label=" " :show-message="false">
  189. <el-input disabled v-model="modalData.customerDesc"></el-input>
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. </el-col>
  194. <el-col :span="4">
  195. <el-form-item label="打样数量" prop="proofingNumber" :show-message="false">
  196. <el-input-number :controls="false" :disabled="detailVisible" :min="0" v-model="modalData.proofingNumber" :step="0" style="width: 100%"></el-input-number>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="4">
  200. <el-form-item label="优先等级" :show-message="false">
  201. <dict-data-select v-if="modalFlag" :disabled="columnFlagByHeader('priorityLevel') || detailVisible"
  202. v-model="modalData.priorityLevel"
  203. dict-type="priority_Level"></dict-data-select>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="4">
  207. <el-form-item label="要求交付日期" prop="requiredDeliveryDate" :show-message="false">
  208. <el-date-picker v-model="modalData.requiredDeliveryDate" style="width: 100%" type="date"
  209. value-format="yyyy-MM-dd" placeholder="选择日期"
  210. :disabled="columnFlagByHeader('requiredDeliveryDate') || detailVisible"></el-date-picker>
  211. </el-form-item>
  212. </el-col>
  213. </el-row>
  214. <el-row :gutter="15">
  215. <el-col :span="8">
  216. <el-row :gutter="10">
  217. <el-col :span="10">
  218. <el-form-item prop="projectId" label="项目编码" :show-message="false">
  219. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'"
  220. @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
  221. <el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')"
  222. v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="14">
  226. <el-form-item label=" " :show-message="false">
  227. <el-input disabled v-model="modalData.projectName"></el-input>
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. </el-col>
  232. <el-col :span="4">
  233. <el-form-item :show-message="false">
  234. <label v-if="columnFlagByHeader('tracker') || detailVisible" slot="label">CS</label>
  235. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  236. <el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker') || detailVisible" readonly>
  237. <span slot="suffix" v-show="modalData.trackerName && !detailVisible" @click="clearModalData('tracker')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  238. </el-input>
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="4">
  242. <el-form-item :show-message="false">
  243. <label v-if="columnFlagByHeader('engineer') || detailVisible" slot="label">NPI工程师</label>
  244. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a>NPI工程师</a></span>
  245. <el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer') || detailVisible" readonly>
  246. <span slot="suffix" v-show="modalData.engineerName && !detailVisible" @click="clearModalData('engineer')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  247. </el-input>
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="4">
  251. <el-form-item>
  252. <label v-if="columnFlagByHeader('approver') || detailVisible" slot="label">Approver</label>
  253. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2053)"><a
  254. herf="#">Approver</a></span>
  255. <el-input v-model="modalData.approverName" :disabled="columnFlagByHeader('approver') || detailVisible" readonly>
  256. <span slot="suffix" v-show="modalData.approverName && !detailVisible" @click="clearModalData('approver')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  257. </el-input>
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="4">
  261. <el-form-item>
  262. <label v-if="columnFlagByDelegateAccess('delegateAccess') || detailVisible" slot="label">DelegateAccess</label>
  263. <span v-else style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  264. <el-input v-model="delegateAccessName" :disabled="columnFlagByDelegateAccess('delegateAccess') || detailVisible" readonly>
  265. <span slot="suffix" v-show="delegateAccessName && !detailVisible" @click="selectionDelegateAccess = []"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  266. </el-input>
  267. </el-form-item>
  268. </el-col>
  269. </el-row>
  270. <el-row :gutter="15">
  271. <el-col :span="24">
  272. <el-form-item label="样品寄送地址" class="auto">
  273. <el-input type="textarea" v-model="modalData.sendSamplesAddress" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  274. </el-form-item>
  275. </el-col>
  276. </el-row>
  277. <el-row :gutter="15">
  278. <el-col :span="24">
  279. <el-form-item label="备注" style="height: 90px">
  280. <el-input type="textarea" v-model="modalData.technicalConsiderations" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  281. </el-form-item>
  282. </el-col>
  283. </el-row>
  284. </el-form>
  285. <div class="rq">
  286. <el-form :inline="true" label-position="top" :model="projectPartData" v-if="modalData.flag === '1'">
  287. <el-form-item label="物料编码">
  288. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  289. </el-form-item>
  290. <el-form-item label="物料名称">
  291. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  292. </el-form-item>
  293. <el-form-item label="IFS料号">
  294. <el-input v-model="projectPartData.finalPartNo" clearable style="width: 120px"></el-input>
  295. </el-form-item>
  296. <el-form-item label="客户料号">
  297. <el-input v-model="projectPartData.customerPartNo" clearable style="width: 120px"></el-input>
  298. </el-form-item>
  299. <el-form-item label=" " v-if="modalData.projectId">
  300. <el-button type="primary" @click="getProjectPartList">查询</el-button>
  301. </el-form-item>
  302. </el-form>
  303. <el-table
  304. :height="300"
  305. :data="projectPartList"
  306. ref="projectPartTable"
  307. @row-click="projectPartClickRow"
  308. @selection-change="selectionProjectPart"
  309. :row-key="getRowKeys"
  310. border
  311. v-loading="queryLoading"
  312. style="width: 100%;">
  313. <el-table-column
  314. type="selection"
  315. header-align="center"
  316. align="center"
  317. :selectable="checkSelectable"
  318. :reserve-selection="true"
  319. width="50">
  320. </el-table-column>
  321. <el-table-column
  322. v-for="(item,index) in projectPartDetailList" :key="index"
  323. :sortable="item.columnSortable"
  324. :prop="item.columnProp"
  325. :header-align="item.headerAlign"
  326. :show-overflow-tooltip="item.showOverflowTooltip"
  327. :align="item.align"
  328. :fixed="item.fixed===''?false:item.fixed"
  329. :min-width="item.columnWidth"
  330. :label="item.columnLabel">
  331. <template slot-scope="scope">
  332. <template v-if="item.columnProp === 'testPartNo'">
  333. <a @click="handleRouter(scope.row)">{{ scope.row[item.columnProp] }}</a>
  334. </template>
  335. <template v-else>
  336. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  337. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  338. </template>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. </div>
  343. <el-pagination style="margin-top: 0"
  344. @size-change="handleSizeChange"
  345. @current-change="handleCurrentChange"
  346. :current-page="no"
  347. :page-sizes="[20, 50, 100, 200, 500]"
  348. :page-size="size"
  349. :total="total"
  350. layout="total, sizes, prev, pager, next, jumper">
  351. </el-pagination>
  352. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  353. <el-button type="primary" @click="saveData()">保存</el-button>
  354. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  355. <el-button v-if="modalData.proofingStatus === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  356. <el-button v-if="modalData.proofingStatus === '审批中' && modalData.isReject === 'Y'"
  357. @click="rejectVisible = true" type="primary">驳回
  358. </el-button>
  359. </el-footer>
  360. </el-dialog>
  361. <!-- 录入打样结果模态框 -->
  362. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
  363. width="785px">
  364. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  365. style="margin-left: 0px;margin-top: 10px;">
  366. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  367. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd"
  368. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  369. </el-form-item>
  370. </el-form>
  371. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  372. style="margin-left:0px;margin-top: 5px;">
  373. <el-form-item label="打样结果信息" prop="proofingResultInformation"
  374. :rules="enterResultRules.proofingResultInformation">
  375. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none'
  376. show-word-limit style="width: 500px;height: 30px"></el-input>
  377. </el-form-item>
  378. </el-form>
  379. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  380. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  381. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  382. </el-form>
  383. <el-table
  384. :height="200"
  385. :data="fileContentList"
  386. border
  387. v-loading="dataListLoading"
  388. style="width: 100%">
  389. <el-table-column
  390. v-for="(item,index) in fileColumnList" :key="index"
  391. :sortable="item.columnSortable"
  392. :prop="item.columnProp"
  393. :header-align="item.headerAlign"
  394. :show-overflow-tooltip="item.showOverflowTooltip"
  395. :align="item.align"
  396. :fixed="item.fixed===''?false:item.fixed"
  397. :min-width="item.columnWidth"
  398. :label="item.columnLabel">
  399. <template slot-scope="scope">
  400. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  401. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  402. </template>
  403. </el-table-column>
  404. <el-table-column
  405. fixed="right"
  406. header-align="center"
  407. align="center"
  408. width="100"
  409. label="操作">
  410. <template slot-scope="scope">
  411. <a @click="deleteFile(scope.row)">删除</a>
  412. </template>
  413. </el-table-column>
  414. </el-table>
  415. </el-form>
  416. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  417. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  418. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  419. </el-footer>
  420. </el-dialog>
  421. <!-- 录入送样信息模态框 -->
  422. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag"
  423. width="620px">
  424. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules"
  425. style="margin-left: 0px;margin-top: 10px;">
  426. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate"
  427. :rules="submitResultRules.actualitySendSamplesDate">
  428. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd"
  429. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  430. </el-form-item>
  431. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  432. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  433. <el-option label="客户自提" value="客户自提"></el-option>
  434. <el-option label="人员带货" value="人员带货"></el-option>
  435. <el-option label="其它" value="其它"></el-option>
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item label="送货信息">
  439. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  440. </el-form-item>
  441. </el-form>
  442. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  443. <el-form-item label="送货备注">
  444. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none'
  445. show-word-limit style="width: 456px;height: 30px"></el-input>
  446. </el-form-item>
  447. </el-form>
  448. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  449. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  450. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  451. </el-footer>
  452. </el-dialog>
  453. <!-- 客户回复模态框 -->
  454. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag"
  455. width="620px">
  456. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules"
  457. style="margin-left: 0px;margin-top: 10px;">
  458. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  459. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd"
  460. placeholder="请选择日期" style="width: 185px"></el-date-picker>
  461. </el-form-item>
  462. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  463. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  464. <el-option label="接受" value="接受"></el-option>
  465. <el-option label="不接受" value="不接受"></el-option>
  466. </el-select>
  467. </el-form-item>
  468. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  469. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  470. </el-form-item>
  471. </el-form>
  472. <el-form :inline="true" label-position="top" :model="customerResponseData"
  473. style="margin-left:0px;margin-top: 5px;">
  474. <el-form-item label="客户回复信息">
  475. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none'
  476. show-word-limit style="width: 595px;height: 30px"></el-input>
  477. </el-form-item>
  478. </el-form>
  479. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  480. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  481. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  482. </el-footer>
  483. </el-dialog>
  484. <!--选择项目模态框-->
  485. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
  486. :visible.sync="chooseProjectListFlag" width="35%" :close-on-click-modal="false">
  487. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  488. <el-row :gutter="10">
  489. <el-col :span="6">
  490. <el-form-item label="项目编码">
  491. <el-input v-model="searchProjectData.projectId"></el-input>
  492. </el-form-item>
  493. </el-col>
  494. <el-col :span="6">
  495. <el-form-item label="项目名称">
  496. <el-input v-model="searchProjectData.projectName"></el-input>
  497. </el-form-item>
  498. </el-col>
  499. <el-col :span="6">
  500. <el-form-item label=" ">
  501. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  502. </el-form-item>
  503. </el-col>
  504. </el-row>
  505. <el-table :height="223"
  506. :data="projectList"
  507. border
  508. @row-click="projectClickRow">
  509. <el-table-column label="项目编码" prop="projectId"/>
  510. <el-table-column label="项目名称" prop="projectName"/>
  511. </el-table>
  512. </el-form>
  513. </el-dialog>
  514. <!-- 页签 -->
  515. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card"
  516. @tab-click="tabClick" class="customer-tab">
  517. <el-tab-pane label="基本信息" name="attribute">
  518. <proofing-attribute ref="dialogAttribute" :disabled="proofingCurrentRow.proofingStatus === '已完成'" :order-no="proofingCurrentRow.proofingNo" :code-no="'Proofing'" :function-type="'order'"></proofing-attribute>
  519. </el-tab-pane>
  520. <!-- 项目信息页签 -->
  521. <el-tab-pane label="项目信息" name="project_information">
  522. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  523. <el-row :gutter="20">
  524. <el-col :span="8">
  525. <div class="grid-content bg-purple">
  526. <el-form-item label="项目号">
  527. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  528. </el-form-item>
  529. </div>
  530. </el-col>
  531. <el-col :span="8">
  532. <div class="grid-content bg-purple">
  533. <el-form-item label="项目名称">
  534. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  535. </el-form-item>
  536. </div>
  537. </el-col>
  538. <el-col :span="8">
  539. <div class="grid-content bg-purple">
  540. <el-form-item label="项目类型">
  541. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  542. </el-form-item>
  543. </div>
  544. </el-col>
  545. </el-row>
  546. <el-row :gutter="20">
  547. <el-col :span="8">
  548. <div class="grid-content bg-purple">
  549. <el-form-item label="客户来源">
  550. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  551. </el-form-item>
  552. </div>
  553. </el-col>
  554. <el-col :span="8">
  555. <div class="grid-content bg-purple">
  556. <el-form-item label="优先级">
  557. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  558. </el-form-item>
  559. </div>
  560. </el-col>
  561. <el-col :span="8">
  562. <div class="grid-content bg-purple">
  563. <el-form-item label="终端客户">
  564. <el-input v-model="projectInformationData.finalCustomerName" readonly></el-input>
  565. </el-form-item>
  566. </div>
  567. </el-col>
  568. </el-row>
  569. <el-row :gutter="20">
  570. <el-col :span="8">
  571. <div class="grid-content bg-purple">
  572. <el-form-item label="项目经理">
  573. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  574. </el-form-item>
  575. </div>
  576. </el-col>
  577. <el-col :span="8">
  578. <div class="grid-content bg-purple">
  579. <el-form-item label="项目负责人">
  580. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  581. </el-form-item>
  582. </div>
  583. </el-col>
  584. <el-col :span="8">
  585. <div class="grid-content bg-purple">
  586. <el-form-item label="项目权限">
  587. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  588. </el-form-item>
  589. </div>
  590. </el-col>
  591. </el-row>
  592. <el-row :gutter="20">
  593. <el-col :span="6">
  594. <div class="grid-content bg-purple">
  595. <el-form-item label="创建时间">
  596. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  597. </el-form-item>
  598. </div>
  599. </el-col>
  600. <el-col :span="6">
  601. <div class="grid-content bg-purple">
  602. <el-form-item label="创建人">
  603. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  604. </el-form-item>
  605. </div>
  606. </el-col>
  607. <el-col :span="6">
  608. <div class="grid-content bg-purple">
  609. <el-form-item label="更新时间">
  610. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  611. </el-form-item>
  612. </div>
  613. </el-col>
  614. <el-col :span="6">
  615. <div class="grid-content bg-purple">
  616. <el-form-item label="更新人">
  617. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  618. </el-form-item>
  619. </div>
  620. </el-col>
  621. </el-row>
  622. <el-row :gutter="20">
  623. <el-col :span="24">
  624. <div class="grid-content bg-purple">
  625. <el-form-item label="项目描述">
  626. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  627. </el-form-item>
  628. </div>
  629. </el-col>
  630. </el-row>
  631. <el-row :gutter="20">
  632. <el-col :span="24">
  633. <div class="grid-content bg-purple">
  634. <el-form-item label="其它特殊要求">
  635. <el-input v-model="projectInformationData.remark" readonly></el-input>
  636. </el-form-item>
  637. </div>
  638. </el-col>
  639. </el-row>
  640. </el-form>
  641. </el-tab-pane>
  642. <!-- 客户信息页签 -->
  643. <el-tab-pane label="客户信息" name="customer_information">
  644. <customer-info :project="proofingCurrentRow"></customer-info>
  645. </el-tab-pane>
  646. <el-tab-pane label="附件信息" name="proofing_file">
  647. <oss-components label="打样单号" style="margin-top: 5px" height="28vh" :columns="ossColumns"
  648. :order-ref2="proofingCurrentRow.proofingNo"
  649. :order-ref1="proofingCurrentRow.site" :disabled="proofingCurrentRow.proofingStatus === '已完成'"></oss-components>
  650. </el-tab-pane>
  651. <!-- 审批信息 -->
  652. <el-tab-pane label="审批信息" name="approvalInformation">
  653. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="320"></approval-information>
  654. </el-tab-pane>
  655. </el-tabs>
  656. <!-- chooseList模态框 -->
  657. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  658. <!-- 客户地址 -->
  659. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  660. <el-table
  661. :height="300"
  662. :data="addressList"
  663. @row-dblclick="getAddressData"
  664. border
  665. style="width: 100%;">
  666. <el-table-column
  667. v-for="(item,index) in columnAddressList" :key="index"
  668. :sortable="item.columnSortable"
  669. :prop="item.columnProp"
  670. :header-align="item.headerAlign"
  671. :show-overflow-tooltip="item.showOverflowTooltip"
  672. :align="item.align"
  673. :fixed="item.fixed==''?false:item.fixed"
  674. :min-width="item.columnWidth"
  675. :label="item.columnLabel">
  676. <template slot-scope="scope">
  677. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  678. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  679. style="width: 100px; height: 80px"/></span>
  680. </template>
  681. </el-table-column>
  682. </el-table>
  683. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  684. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  685. </el-footer>
  686. </el-dialog>
  687. <!-- 联系人 -->
  688. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  689. <el-table
  690. :height="300"
  691. :data="contactList"
  692. @row-dblclick="getContactData"
  693. border
  694. style="width: 100%;">
  695. <el-table-column
  696. v-for="(item,index) in columnContactList" :key="index"
  697. :sortable="item.columnSortable"
  698. :prop="item.columnProp"
  699. :header-align="item.headerAlign"
  700. :show-overflow-tooltip="item.showOverflowTooltip"
  701. :align="item.align"
  702. :fixed="item.fixed==''?false:item.fixed"
  703. :min-width="item.columnWidth"
  704. :label="item.columnLabel">
  705. <template slot-scope="scope">
  706. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  707. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  708. style="width: 100px; height: 80px"/></span>
  709. </template>
  710. </el-table-column>
  711. </el-table>
  712. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  713. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  714. </el-footer>
  715. </el-dialog>
  716. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  717. :visible.sync="delegateAccessVisible" width="40vw">
  718. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  719. <el-form-item label="编码">
  720. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  721. </el-form-item>
  722. <el-form-item label="名称">
  723. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  724. </el-form-item>
  725. <el-form-item label=" ">
  726. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  727. </el-form-item>
  728. </el-form>
  729. <el-table v-if="delegateAccessVisible"
  730. :height="300"
  731. :data="baseDelegateAccessList"
  732. @selection-change="handleSelectionChange"
  733. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  734. ref="delegateAccesstTable"
  735. border row-key="delegateAccess"
  736. style="width: 100%;">
  737. <el-table-column
  738. type="selection"
  739. header-align="center"
  740. align="center"
  741. :reserve-selection="true"
  742. width="50">
  743. </el-table-column>
  744. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  745. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  746. </el-table>
  747. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  748. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  749. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  750. </el-footer>
  751. </el-dialog>
  752. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="rejectVisible" width="500px">
  753. <el-form label-position="top">
  754. <el-form-item label="驳回意见" class="auto">
  755. <el-input type="textarea" v-model="rejectOpinion" :rows="3"></el-input>
  756. </el-form-item>
  757. </el-form>
  758. <el-footer style="text-align:center;height: 30px;line-height: 30px;">
  759. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  760. <el-button type="primary" @click="rejectVisible = false">取消</el-button>
  761. </el-footer>
  762. </el-dialog>
  763. <!-- 上传文件的modal -->
  764. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  765. </div>
  766. </template>
  767. <script>
  768. import {
  769. proofingInformationSearch, // 打样信息列表查询
  770. proofingInformationSave, // 打样信息新增
  771. proofingInformationEdit, // 打样信息编辑
  772. proofingInformationDelete, // 打样信息删除
  773. getFileContentList, // 获取打样单附件列表
  774. proofingResultSearch, // 获取打样结果对象
  775. deleteProofingFile, // 文件删除
  776. saveProofingResult, // 保存打样结果
  777. saveSubmitResult, // 保存送样结果
  778. saveCustomerResponse, // 保存客户回复
  779. getProjectPartList, // 获取产品列表
  780. getProjectInformation, // 获取项目信息
  781. getCustomerInformation, // 获取客户信息
  782. } from '@/api/proofing/proofingInformation.js'
  783. import {
  784. downLoadQuotationFile, // 文件下载
  785. searchProjectInfoList,
  786. } from '@/api/quotation/quotationInformation.js'
  787. import {
  788. customerAddressSearch, // 客户联系地址列表查询
  789. } from '@/api/customer/customerAddress.js'
  790. import {
  791. customerContactSearch, // 客户联系人列表查询
  792. } from '@/api/customer/customerContact.js'
  793. import Chooselist from '@/views/modules/common/Chooselist'
  794. import proofingUploadFile from "./proofing_upload_file"
  795. import DictDataSelect from "../sys/dict-data-select.vue";
  796. import {
  797. proofingInformationEditStatus, queryBuList,
  798. searchDelegateAccess,
  799. searchDelegateAccessByUser, submitChange
  800. } from "../../../api/proofing/proofingInformation";
  801. import {getNodeAuthority, getApprovalList} from "../../../api/changeManagement/changeManagement";
  802. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  803. import profingFile from "./profingFile"
  804. import proofingAttribute from "../demoComponents/orderProperties"
  805. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  806. import {queryCustomer} from "../../../api/customer/customerInformation";
  807. import {queryProjectByCustomer} from "../../../api/project/project";
  808. import OssComponents from "../oss/ossComponents.vue";
  809. import BuSelect from "../base/BuSelect.vue";
  810. import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
  811. export default {
  812. components: {
  813. CustomerInfo,
  814. BuSelect,
  815. OssComponents,
  816. ApprovalInformation,
  817. ProjectInfo
  818. , DictDataSelect
  819. , Chooselist
  820. , proofingUploadFile
  821. , profingFile
  822. , proofingAttribute
  823. },
  824. watch: {
  825. searchData: {
  826. deep: true,
  827. handler: function (newV, oldV) {
  828. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  829. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  830. }
  831. },
  832. 'modalData.proofingNo'(newV, oldV) {
  833. if (newV) {
  834. this.modalData.proofingNo = newV.toUpperCase()
  835. }
  836. },
  837. 'modalData.customerNo'(newV, oldV) {
  838. if (newV) {
  839. this.modalData.customerNo = newV.toUpperCase()
  840. }
  841. if (oldV) {
  842. if (!newV) {
  843. this.modalData.customerDesc = ''
  844. }
  845. this.modalData.projectId = ''
  846. this.modalData.consignee = ''
  847. this.modalData.consigneeContact = ''
  848. this.modalData.sendSamplesAddress = ''
  849. }
  850. },
  851. 'modalData.projectId'(newV, oldV) {
  852. if (newV) {
  853. this.modalData.projectId = newV.toUpperCase()
  854. }
  855. if (oldV) {
  856. if (!newV) {
  857. this.modalData.projectName = ''
  858. }
  859. this.modalData.testPartNo = ''
  860. this.modalData.partName = ''
  861. this.projectPartListSelections = [];
  862. this.projectPartList = [];
  863. this.$refs.projectPartTable.clearSelection();
  864. }
  865. },
  866. rejectVisible(newVal, oldVal) {
  867. if (newVal === false) {
  868. this.rejectOpinion = ''
  869. }
  870. },
  871. "searchData.proofingNo"(newVal, oldVal) {
  872. this.searchData.proofingNo = newVal.toUpperCase()
  873. },
  874. 'modalFlag'(newVal, oldVal){
  875. if (newVal === false){
  876. this.detailVisible = false
  877. this.projectPartData.finalPartNo = ''
  878. this.projectPartData.customerPartNo = ''
  879. this.no = 1
  880. this.size = 20
  881. this.total = 0
  882. this.projectPartList = []
  883. this.projectPartListSelections = []
  884. }
  885. },
  886. 'modalData.tracker'(newVal,oldVal){
  887. if (!newVal){
  888. this.modalData.trackerName = ''
  889. }
  890. },
  891. 'modalData.engineer'(newVal,oldVal){
  892. if (!newVal){
  893. this.modalData.engineerName = ''
  894. }
  895. },
  896. 'modalData.approver'(newVal,oldVal){
  897. if (!newVal){
  898. this.modalData.approverName = ''
  899. }
  900. },
  901. },
  902. computed: {
  903. delegateAccessName: {
  904. get() {
  905. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  906. },
  907. set(val) {
  908. }
  909. },
  910. columnFlagByHeader() {
  911. return (value) => {
  912. if (this.modalData.flag === '1') {
  913. return false
  914. }
  915. if (!this.columnFieldList1) {
  916. return true
  917. }
  918. let arr = this.columnFieldList1.filter(a => a.fieldId === value)
  919. if (arr.length > 0) {
  920. return arr[0].updateFlag === 'N'
  921. }
  922. return true
  923. }
  924. },
  925. columnFlagByDelegateAccess() {
  926. return (value) => {
  927. if (this.modalData.flag === '1') {
  928. return false
  929. }
  930. if (!this.columnFieldList2) {
  931. return true
  932. }
  933. let arr = this.columnFieldList2.filter(a => a.fieldId === value)
  934. if (arr.length > 0) {
  935. return arr[0].updateFlag === 'N'
  936. }
  937. return true
  938. }
  939. },
  940. },
  941. data() {
  942. return {
  943. approvalList: [],
  944. selectionDelegateAccess: [],
  945. selectionDelegateAccess2: [],
  946. delegateAccessVisible: false,
  947. baseDelegateAccessList: [],
  948. proofingDelegateAccess: {
  949. delegateAccess: '',
  950. delegateAccessName: '',
  951. },
  952. activeName: 'part',
  953. // 导出
  954. exportData: [],
  955. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  956. exportHeader: ['设备分类'],
  957. exportFooter: [],
  958. resultList: [],
  959. // ======== 行高 ========
  960. height: 300,
  961. secondHeight: 200,
  962. // ======== 分页 ========
  963. pageIndex: 1,
  964. pageSize: 50,
  965. totalPage: 0,
  966. selectedDataNum: 0,
  967. // 条件查询
  968. searchData: {
  969. site: this.$store.state.user.site,
  970. customerNo: '',
  971. customerDesc: '',
  972. trackerName: '',
  973. testPartNo: '',
  974. partName: '',
  975. proofingStatus: '',
  976. proofingResultStatus: '',
  977. startDate: '',
  978. endDate: '',
  979. projectId: '',
  980. projectName: '',
  981. engineerName: '',
  982. priorityLevel: '',
  983. proofingNo: '',
  984. customerPartNo: '',
  985. finalPartNo: '',
  986. page: 1,
  987. limit: 10,
  988. menuId: this.$route.meta.menuId,
  989. buNo: '',
  990. },
  991. // 其它
  992. dataListLoading: false,
  993. // 初始页签
  994. activeTable: 'attribute',
  995. // ======== 数据对象 ========
  996. modalData: {
  997. flag: '1',
  998. title: '打样新增',
  999. site: this.$store.state.user.site,
  1000. proofingNo: '',
  1001. customerNo: '',
  1002. customerDesc: '',
  1003. projectId: '',
  1004. projectName: '',
  1005. tracker: '',
  1006. trackerName: '',
  1007. testPartNo: '',
  1008. partName: '',
  1009. engineer: '',
  1010. engineerName: '',
  1011. approver: '',
  1012. approverName: '',
  1013. priorityLevel: '',
  1014. proofingNumber: 1,
  1015. requiredDeliveryDate: '',
  1016. remark: '',
  1017. technicalConsiderations: '',
  1018. isNeedToSendSamples: '',
  1019. sendSamplesAddress: '',
  1020. consignee: '',
  1021. consigneeContact: '',
  1022. actualityDeliveryDate: '',
  1023. proofingResultInformation: '',
  1024. actualitySendSamplesDate: '',
  1025. sendSamplesMethod: '',
  1026. deliverGoodsInformation: '',
  1027. deliverGoodsRemark: '',
  1028. actualityReplyDate: '',
  1029. confirmResults: '',
  1030. confirmBy: '',
  1031. confirmInformation: '',
  1032. proofingStatus: '草稿',
  1033. proofingResultStatus: 'B',
  1034. nextToDo: '',
  1035. createDate: '',
  1036. createBy: '',
  1037. updateDate: '',
  1038. updateBy: '',
  1039. nodeConclusion: '',
  1040. stepId: '',
  1041. rejectFlag: '',
  1042. rejectStepId: '',
  1043. isReject: '',
  1044. nodeId: ''
  1045. },
  1046. proofingDetailData: {
  1047. technicalConsiderations: '',
  1048. isNeedToSendSamples: '',
  1049. sendSamplesAddress: '',
  1050. consignee: '',
  1051. consigneeContact: ''
  1052. },
  1053. proofingResultData: {
  1054. proofingResultStatus: '',
  1055. actualityDeliveryDate: '',
  1056. isNeedToSendSamples: '',
  1057. proofingResultInformation: '',
  1058. actualitySendSamplesDate: '',
  1059. sendSamplesMethod: '',
  1060. deliverGoodsInformation: '',
  1061. deliverGoodsRemark: '',
  1062. confirmResults: '',
  1063. actualityReplyDate: '',
  1064. confirmBy: '',
  1065. confirmInformation: ''
  1066. },
  1067. enterResultData: {
  1068. site: this.$store.state.user.site,
  1069. proofingNo: '',
  1070. actualityDeliveryDate: '',
  1071. proofingResultInformation: '',
  1072. updateBy: this.$store.state.user.name,
  1073. proofingResultStatus: '',
  1074. fileContentList: []
  1075. },
  1076. submitResultData: {
  1077. site: this.$store.state.user.site,
  1078. proofingNo: '',
  1079. actualitySendSamplesDate: '',
  1080. sendSamplesMethod: '',
  1081. deliverGoodsInformation: '',
  1082. deliverGoodsRemark: '',
  1083. updateBy: this.$store.state.user.name,
  1084. proofingResultStatus: ''
  1085. },
  1086. customerResponseData: {
  1087. site: this.$store.state.user.site,
  1088. proofingNo: '',
  1089. actualityReplyDate: '',
  1090. confirmResults: '',
  1091. confirmBy: '',
  1092. confirmInformation: '',
  1093. updateBy: this.$store.state.user.name,
  1094. proofingResultStatus: ''
  1095. },
  1096. projectPartData: {
  1097. site: this.$store.state.user.site,
  1098. testPartNo: '',
  1099. finalPartNo: '',
  1100. customerPartNo: '',
  1101. partName: ''
  1102. },
  1103. projectInformationData: {
  1104. projectId: '',
  1105. projectName: '',
  1106. projectType: '',
  1107. projectSourceDesc: '',
  1108. priorityDesc: '',
  1109. status: '',
  1110. projectDesc: '',
  1111. projectManagerName: '',
  1112. projectOwnerName: '',
  1113. userRoleName: '',
  1114. remark: ''
  1115. },
  1116. customerInformationData: {
  1117. customerNo: '',
  1118. customerDesc: '',
  1119. importantCustomer: '',
  1120. customerCurrency: '',
  1121. turnoverOfYear: '',
  1122. potentialRevenueOfYear: '',
  1123. customerStatus: '',
  1124. customerIndustry: '',
  1125. companyName: '',
  1126. jobDescription: '',
  1127. customerDescription: '',
  1128. contactName: '',
  1129. contactPhoneNumber1: '',
  1130. position: '',
  1131. addressName: '',
  1132. addressType: '',
  1133. createDate: '',
  1134. createBy: '',
  1135. updateDate: '',
  1136. updateBy: ''
  1137. },
  1138. // ======== 数据列表 ========
  1139. dataList: [],
  1140. fileContentList: [],
  1141. projectPartList: [],
  1142. addressList: [],
  1143. contactList: [],
  1144. // ======== 列表表头 ========
  1145. columnList: [
  1146. {
  1147. userId: this.$store.state.user.name,
  1148. functionId: 103001,
  1149. serialNumber: '103001Table1BuDesc',
  1150. tableId: '103001Table1',
  1151. tableName: '打样信息表',
  1152. columnProp: 'buDesc',
  1153. headerAlign: 'center',
  1154. align: 'center',
  1155. columnLabel: 'BU',
  1156. columnHidden: false,
  1157. columnImage: false,
  1158. columnSortable: false,
  1159. sortLv: 0,
  1160. status: true,
  1161. fixed: '',
  1162. columnWidth: 80
  1163. },
  1164. {
  1165. userId: this.$store.state.user.name,
  1166. functionId: 103001,
  1167. serialNumber: '103001Table1ProofingNo',
  1168. tableId: '103001Table1',
  1169. tableName: '打样信息表',
  1170. columnProp: 'proofingNo',
  1171. headerAlign: 'center',
  1172. align: 'center',
  1173. columnLabel: '打样单号',
  1174. columnHidden: false,
  1175. columnImage: false,
  1176. columnSortable: false,
  1177. sortLv: 0,
  1178. status: true,
  1179. fixed: '',
  1180. columnWidth: 120
  1181. },
  1182. {
  1183. userId: this.$store.state.user.name,
  1184. functionId: 103001,
  1185. serialNumber: '103001Table1CustomerNo',
  1186. tableId: '103001Table1',
  1187. tableName: '打样信息表',
  1188. columnProp: 'customerNo',
  1189. headerAlign: 'center',
  1190. align: 'center',
  1191. columnLabel: '客户编码',
  1192. columnHidden: false,
  1193. columnImage: false,
  1194. columnSortable: false,
  1195. sortLv: 0,
  1196. status: true,
  1197. fixed: '',
  1198. columnWidth: 100
  1199. },
  1200. {
  1201. userId: this.$store.state.user.name,
  1202. functionId: 103001,
  1203. serialNumber: '103001Table1CustomerDesc',
  1204. tableId: '103001Table1',
  1205. tableName: '打样信息表',
  1206. columnProp: 'customerDesc',
  1207. headerAlign: 'center',
  1208. align: 'left',
  1209. columnLabel: '客户名称',
  1210. columnHidden: false,
  1211. columnImage: false,
  1212. columnSortable: false,
  1213. sortLv: 0,
  1214. status: true,
  1215. fixed: '',
  1216. columnWidth: 120
  1217. },
  1218. {
  1219. userId: this.$store.state.user.name,
  1220. functionId: 103001,
  1221. serialNumber: '103001Table1ProjectId',
  1222. tableId: '103001Table1',
  1223. tableName: '打样信息表',
  1224. columnProp: 'projectId',
  1225. headerAlign: 'center',
  1226. align: 'center',
  1227. columnLabel: '项目编码',
  1228. columnHidden: false,
  1229. columnImage: false,
  1230. columnSortable: false,
  1231. sortLv: 0,
  1232. status: true,
  1233. fixed: '',
  1234. columnWidth: 110
  1235. },
  1236. {
  1237. userId: this.$store.state.user.name,
  1238. functionId: 103001,
  1239. serialNumber: '103001Table1ProjectName',
  1240. tableId: '103001Table1',
  1241. tableName: '打样信息表',
  1242. columnProp: 'projectName',
  1243. headerAlign: 'center',
  1244. align: 'left',
  1245. columnLabel: '项目名称',
  1246. columnHidden: false,
  1247. columnImage: false,
  1248. columnSortable: false,
  1249. sortLv: 0,
  1250. status: true,
  1251. fixed: '',
  1252. columnWidth: 120
  1253. },
  1254. {
  1255. userId: this.$store.state.user.name,
  1256. functionId: 103001,
  1257. serialNumber: '103001Table1TestPartNo',
  1258. tableId: '103001Table1',
  1259. tableName: '打样信息表',
  1260. columnProp: 'testPartNo',
  1261. headerAlign: 'center',
  1262. align: 'left',
  1263. columnLabel: '物料编码',
  1264. columnHidden: false,
  1265. columnImage: false,
  1266. columnSortable: false,
  1267. sortLv: 0,
  1268. status: true,
  1269. fixed: '',
  1270. columnWidth: 150
  1271. },
  1272. {
  1273. userId: this.$store.state.user.name,
  1274. functionId: 103001,
  1275. serialNumber: '103001Table1PartName',
  1276. tableId: '103001Table1',
  1277. tableName: '打样信息表',
  1278. columnProp: 'partName',
  1279. headerAlign: 'center',
  1280. align: 'left',
  1281. columnLabel: '物料名称',
  1282. columnHidden: false,
  1283. columnImage: false,
  1284. columnSortable: false,
  1285. sortLv: 0,
  1286. status: true,
  1287. fixed: '',
  1288. columnWidth: 100
  1289. },
  1290. {
  1291. userId: this.$store.state.user.name,
  1292. functionId: 103001,
  1293. serialNumber: '103001Table1FinalPartNo',
  1294. tableId: '103001Table1',
  1295. tableName: '打样信息表',
  1296. columnProp: 'finalPartNo',
  1297. headerAlign: 'center',
  1298. align: 'left',
  1299. columnLabel: 'IFS物料编码',
  1300. columnHidden: false,
  1301. columnImage: false,
  1302. columnSortable: false,
  1303. sortLv: 0,
  1304. status: true,
  1305. fixed: '',
  1306. columnWidth: 100
  1307. },
  1308. {
  1309. userId: this.$store.state.user.name,
  1310. functionId: 103001,
  1311. serialNumber: '103001Table1CustomerPartNo',
  1312. tableId: '103001Table1',
  1313. tableName: '打样信息表',
  1314. columnProp: 'customerPartNo',
  1315. headerAlign: 'center',
  1316. align: 'left',
  1317. columnLabel: '客户物料编码',
  1318. columnHidden: false,
  1319. columnImage: false,
  1320. columnSortable: false,
  1321. sortLv: 0,
  1322. status: true,
  1323. fixed: '',
  1324. columnWidth: 100
  1325. },
  1326. {
  1327. userId: this.$store.state.user.name,
  1328. functionId: 103001,
  1329. serialNumber: '103001Table1TrackerName',
  1330. tableId: '103001Table1',
  1331. tableName: '打样信息表',
  1332. columnProp: 'trackerName',
  1333. headerAlign: 'center',
  1334. align: 'center',
  1335. columnLabel: 'CS',
  1336. columnHidden: false,
  1337. columnImage: false,
  1338. columnSortable: false,
  1339. sortLv: 0,
  1340. status: true,
  1341. fixed: '',
  1342. columnWidth: 80
  1343. },
  1344. {
  1345. userId: this.$store.state.user.name,
  1346. functionId: 103001,
  1347. serialNumber: '103001Table1EngineerName',
  1348. tableId: '103001Table1',
  1349. tableName: '打样信息表',
  1350. columnProp: 'engineerName',
  1351. headerAlign: 'center',
  1352. align: 'center',
  1353. columnLabel: 'NPI工程师',
  1354. columnHidden: false,
  1355. columnImage: false,
  1356. columnSortable: false,
  1357. sortLv: 0,
  1358. status: true,
  1359. fixed: '',
  1360. columnWidth: 80
  1361. },
  1362. {
  1363. userId: this.$store.state.user.name,
  1364. functionId: 103001,
  1365. serialNumber: '103001Table1EngineerName',
  1366. tableId: '103001Table1',
  1367. tableName: '打样信息表',
  1368. columnProp: 'approverName',
  1369. headerAlign: 'center',
  1370. align: 'center',
  1371. columnLabel: 'Approver',
  1372. columnHidden: false,
  1373. columnImage: false,
  1374. columnSortable: false,
  1375. sortLv: 0,
  1376. status: true,
  1377. fixed: '',
  1378. columnWidth: 80
  1379. },
  1380. {
  1381. userId: this.$store.state.user.name,
  1382. functionId: 103001,
  1383. serialNumber: '103001Table1PriorityLevel',
  1384. tableId: '103001Table1',
  1385. tableName: '打样信息表',
  1386. columnProp: 'priorityLevel',
  1387. headerAlign: 'center',
  1388. align: 'center',
  1389. columnLabel: '优先等级',
  1390. columnHidden: false,
  1391. columnImage: false,
  1392. columnSortable: false,
  1393. sortLv: 0,
  1394. status: true,
  1395. fixed: '',
  1396. columnWidth: 80
  1397. },
  1398. {
  1399. userId: this.$store.state.user.name,
  1400. functionId: 103001,
  1401. serialNumber: '103001Table1ProofingNumber',
  1402. tableId: '103001Table1',
  1403. tableName: '打样信息表',
  1404. columnProp: 'proofingNumber',
  1405. headerAlign: 'center',
  1406. align: 'right',
  1407. columnLabel: '打样数量',
  1408. columnHidden: false,
  1409. columnImage: false,
  1410. columnSortable: false,
  1411. sortLv: 0,
  1412. status: true,
  1413. fixed: '',
  1414. columnWidth: 80
  1415. },
  1416. {
  1417. userId: this.$store.state.user.name,
  1418. functionId: 103001,
  1419. serialNumber: '103001Table1RequiredDeliveryDate',
  1420. tableId: '103001Table1',
  1421. tableName: '打样信息表',
  1422. columnProp: 'requiredDeliveryDate',
  1423. headerAlign: 'center',
  1424. align: 'center',
  1425. columnLabel: '要求交付日期',
  1426. columnHidden: false,
  1427. columnImage: false,
  1428. columnSortable: false,
  1429. sortLv: 0,
  1430. status: true,
  1431. fixed: '',
  1432. columnWidth: 160
  1433. },
  1434. {
  1435. userId: this.$store.state.user.name,
  1436. functionId: 103001,
  1437. serialNumber: '103001Table1ProofingStatus',
  1438. tableId: '103001Table1',
  1439. tableName: '打样信息表',
  1440. columnProp: 'proofingStatus',
  1441. headerAlign: 'center',
  1442. align: 'left',
  1443. columnLabel: '状态',
  1444. columnHidden: false,
  1445. columnImage: false,
  1446. columnSortable: false,
  1447. sortLv: 0,
  1448. status: true,
  1449. fixed: '',
  1450. columnWidth: 80
  1451. },
  1452. {
  1453. userId: this.$store.state.user.name,
  1454. functionId: 103001,
  1455. serialNumber: '103001Table1NodeName',
  1456. tableId: '103001Table1',
  1457. tableName: '打样信息表',
  1458. columnProp: 'nodeName',
  1459. headerAlign: 'center',
  1460. align: 'left',
  1461. columnLabel: '当前节点',
  1462. columnHidden: false,
  1463. columnImage: false,
  1464. columnSortable: false,
  1465. sortLv: 0,
  1466. status: true,
  1467. fixed: '',
  1468. columnWidth: 150
  1469. },
  1470. {
  1471. userId: this.$store.state.user.name,
  1472. functionId: 103001,
  1473. serialNumber: '103001Table1CreateDate',
  1474. tableId: '103001Table1',
  1475. tableName: '打样信息表',
  1476. columnProp: 'createDate',
  1477. headerAlign: 'center',
  1478. align: 'center',
  1479. columnLabel: '创建时间',
  1480. columnHidden: false,
  1481. columnImage: false,
  1482. columnSortable: false,
  1483. sortLv: 0,
  1484. status: true,
  1485. fixed: '',
  1486. columnWidth: 160
  1487. },
  1488. {
  1489. userId: this.$store.state.user.name,
  1490. functionId: 103001,
  1491. serialNumber: '103001Table1CreateBy',
  1492. tableId: '103001Table1',
  1493. tableName: '打样信息表',
  1494. columnProp: 'createBy',
  1495. headerAlign: 'center',
  1496. align: 'center',
  1497. columnLabel: '创建人',
  1498. columnHidden: false,
  1499. columnImage: false,
  1500. columnSortable: false,
  1501. sortLv: 0,
  1502. status: true,
  1503. fixed: '',
  1504. columnWidth: 80
  1505. },
  1506. {
  1507. userId: this.$store.state.user.name,
  1508. functionId: 103001,
  1509. serialNumber: '103001Table1UpdateDate',
  1510. tableId: '103001Table1',
  1511. tableName: '打样信息表',
  1512. columnProp: 'updateDate',
  1513. headerAlign: 'center',
  1514. align: 'center',
  1515. columnLabel: '更新时间',
  1516. columnHidden: false,
  1517. columnImage: false,
  1518. columnSortable: false,
  1519. sortLv: 0,
  1520. status: true,
  1521. fixed: '',
  1522. columnWidth: 160
  1523. },
  1524. {
  1525. userId: this.$store.state.user.name,
  1526. functionId: 103001,
  1527. serialNumber: '103001Table1UpdateBy',
  1528. tableId: '103001Table1',
  1529. tableName: '打样信息表',
  1530. columnProp: 'updateBy',
  1531. headerAlign: 'center',
  1532. align: 'center',
  1533. columnLabel: '更新人',
  1534. columnHidden: false,
  1535. columnImage: false,
  1536. columnSortable: false,
  1537. sortLv: 0,
  1538. status: true,
  1539. fixed: '',
  1540. columnWidth: 80
  1541. }
  1542. ],
  1543. fileColumnList: [
  1544. {
  1545. userId: this.$store.state.user.name,
  1546. functionId: 103001,
  1547. serialNumber: '103001Table2FileName',
  1548. tableId: '103001Table2',
  1549. tableName: '文件信息表',
  1550. columnProp: 'fileName',
  1551. headerAlign: 'center',
  1552. align: 'center',
  1553. columnLabel: '文件名称',
  1554. columnHidden: false,
  1555. columnImage: false,
  1556. columnSortable: false,
  1557. sortLv: 0,
  1558. status: true,
  1559. fixed: '',
  1560. columnWidth: 140
  1561. },
  1562. {
  1563. userId: this.$store.state.user.name,
  1564. functionId: 103001,
  1565. serialNumber: '103001Table2FileRemark',
  1566. tableId: '103001Table2',
  1567. tableName: '文件信息表',
  1568. columnProp: 'fileRemark',
  1569. headerAlign: 'center',
  1570. align: 'center',
  1571. columnLabel: '备注',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. columnSortable: false,
  1575. sortLv: 0,
  1576. status: true,
  1577. fixed: '',
  1578. columnWidth: 240
  1579. },
  1580. // {
  1581. // userId: this.$store.state.user.name,
  1582. // functionId: 103001,
  1583. // serialNumber: '103001Table2OrderRef3',
  1584. // tableId: '103001Table2',
  1585. // tableName: '文件信息表',
  1586. // columnProp: 'orderRef3',
  1587. // headerAlign: 'center',
  1588. // align: 'center',
  1589. // columnLabel: '文件描述',
  1590. // columnHidden: false,
  1591. // columnImage: false,
  1592. // columnSortable: false,
  1593. // sortLv: 0,
  1594. // status: true,
  1595. // fixed: '',
  1596. // columnWidth: 120
  1597. // },
  1598. {
  1599. userId: this.$store.state.user.name,
  1600. functionId: 103001,
  1601. serialNumber: '103001Table2CreateDate',
  1602. tableId: '103001Table2',
  1603. tableName: '文件信息表',
  1604. columnProp: 'createDate',
  1605. headerAlign: 'center',
  1606. align: 'center',
  1607. columnLabel: '上传时间',
  1608. columnHidden: false,
  1609. columnImage: false,
  1610. columnSortable: false,
  1611. sortLv: 0,
  1612. status: true,
  1613. fixed: '',
  1614. columnWidth: 140
  1615. },
  1616. {
  1617. userId: this.$store.state.user.name,
  1618. functionId: 103001,
  1619. serialNumber: '103001Table2CreatedBy',
  1620. tableId: '103001Table2',
  1621. tableName: '文件信息表',
  1622. columnProp: 'createdBy',
  1623. headerAlign: 'center',
  1624. align: 'center',
  1625. columnLabel: '上传人',
  1626. columnHidden: false,
  1627. columnImage: false,
  1628. columnSortable: false,
  1629. sortLv: 0,
  1630. status: true,
  1631. fixed: '',
  1632. columnWidth: 140
  1633. }
  1634. ],
  1635. projectPartDetailList: [
  1636. {
  1637. userId: this.$store.state.user.name,
  1638. functionId: 102001,
  1639. serialNumber: '103001Table4TestPartNo',
  1640. tableId: '103001Table4',
  1641. tableName: '项目物料表',
  1642. columnProp: 'testPartNo',
  1643. headerAlign: 'center',
  1644. align: 'left',
  1645. columnLabel: '物料编码',
  1646. columnHidden: false,
  1647. columnImage: false,
  1648. columnSortable: false,
  1649. sortLv: 0,
  1650. status: true,
  1651. fixed: '',
  1652. columnWidth: 150
  1653. },
  1654. {
  1655. userId: this.$store.state.user.name,
  1656. functionId: 102001,
  1657. serialNumber: '103001Table4PartDesc',
  1658. tableId: '103001Table4',
  1659. tableName: '项目物料表',
  1660. columnProp: 'partDesc',
  1661. headerAlign: 'center',
  1662. align: 'left',
  1663. columnLabel: '物料名称',
  1664. columnHidden: false,
  1665. columnImage: false,
  1666. columnSortable: false,
  1667. sortLv: 0,
  1668. status: true,
  1669. fixed: '',
  1670. columnWidth: 120
  1671. },
  1672. {
  1673. userId: this.$store.state.user.name,
  1674. functionId: 102001,
  1675. serialNumber: '103001Table4FinalPartNo',
  1676. tableId: '103001Table4',
  1677. tableName: '项目物料表',
  1678. columnProp: 'finalPartNo',
  1679. headerAlign: 'center',
  1680. align: 'left',
  1681. columnLabel: 'IFS料号',
  1682. columnHidden: false,
  1683. columnImage: false,
  1684. columnSortable: false,
  1685. sortLv: 0,
  1686. status: true,
  1687. fixed: '',
  1688. columnWidth: 120
  1689. },
  1690. {
  1691. userId: this.$store.state.user.name,
  1692. functionId: 102001,
  1693. serialNumber: '103001Table4CustomerPartNo',
  1694. tableId: '103001Table4',
  1695. tableName: '项目物料表',
  1696. columnProp: 'customerPartNo',
  1697. headerAlign: 'center',
  1698. align: 'left',
  1699. columnLabel: '客户料号',
  1700. columnHidden: false,
  1701. columnImage: false,
  1702. columnSortable: false,
  1703. sortLv: 0,
  1704. status: true,
  1705. fixed: '',
  1706. columnWidth: 120
  1707. },
  1708. {
  1709. userId: this.$store.state.user.name,
  1710. functionId: 102001,
  1711. serialNumber: '103001Table4PartSpec',
  1712. tableId: '103001Table4',
  1713. tableName: '项目物料表',
  1714. columnProp: 'partSpec',
  1715. headerAlign: 'center',
  1716. align: 'center',
  1717. columnLabel: '产品规格',
  1718. columnHidden: false,
  1719. columnImage: false,
  1720. columnSortable: false,
  1721. sortLv: 0,
  1722. status: true,
  1723. fixed: '',
  1724. columnWidth: 120
  1725. }, {
  1726. userId: this.$store.state.user.name,
  1727. functionId: 102001,
  1728. serialNumber: '103001Table4PartTypeDesc',
  1729. tableId: '103001Table4',
  1730. tableName: '项目物料表',
  1731. columnProp: 'partTypeDesc',
  1732. headerAlign: 'center',
  1733. align: 'center',
  1734. columnLabel: '产品类型',
  1735. columnHidden: false,
  1736. columnImage: false,
  1737. columnSortable: false,
  1738. sortLv: 0,
  1739. status: true,
  1740. fixed: '',
  1741. columnWidth: 120
  1742. },
  1743. {
  1744. userId: this.$store.state.user.name,
  1745. functionId: 102001,
  1746. serialNumber: '103001Table4Type',
  1747. tableId: '103001Table4',
  1748. tableName: '项目物料表',
  1749. columnProp: 'type',
  1750. headerAlign: 'center',
  1751. align: 'center',
  1752. columnLabel: '制造类型',
  1753. columnHidden: false,
  1754. columnImage: false,
  1755. columnSortable: false,
  1756. sortLv: 0,
  1757. status: true,
  1758. fixed: '',
  1759. columnWidth: 120
  1760. },
  1761. {
  1762. userId: this.$store.state.user.name,
  1763. functionId: 102001,
  1764. serialNumber: '103001Table4UmId',
  1765. tableId: '103001Table4',
  1766. tableName: '项目物料表',
  1767. columnProp: 'umId',
  1768. headerAlign: 'center',
  1769. align: 'center',
  1770. columnLabel: '单位',
  1771. columnHidden: false,
  1772. columnImage: false,
  1773. columnSortable: false,
  1774. sortLv: 0,
  1775. status: true,
  1776. fixed: '',
  1777. columnWidth: 100
  1778. },
  1779. ],
  1780. columnAddressList: [
  1781. {
  1782. userId: this.$store.state.user.name,
  1783. functionId: 103001,
  1784. serialNumber: '103001Table4AddressName',
  1785. tableId: '103001Table4',
  1786. tableName: '联系地址表',
  1787. columnProp: 'addressName',
  1788. headerAlign: 'center',
  1789. align: 'center',
  1790. columnLabel: '联系地址',
  1791. columnHidden: false,
  1792. columnImage: false,
  1793. status: true,
  1794. fixed: '',
  1795. },
  1796. {
  1797. userId: this.$store.state.user.name,
  1798. functionId: 103001,
  1799. serialNumber: '103001Table4ContactStatus',
  1800. tableId: '103001Table4',
  1801. tableName: '联系地址表',
  1802. columnProp: 'addressStatus',
  1803. headerAlign: 'center',
  1804. align: 'center',
  1805. columnLabel: '地址状态',
  1806. columnHidden: false,
  1807. columnImage: false,
  1808. status: true,
  1809. fixed: '',
  1810. },
  1811. ],
  1812. columnContactList: [
  1813. {
  1814. userId: this.$store.state.user.name,
  1815. functionId: 103001,
  1816. serialNumber: '103001Table5ContactName',
  1817. tableId: '103001Table5',
  1818. tableName: '客户联系人表',
  1819. columnProp: 'contactName',
  1820. headerAlign: 'center',
  1821. align: 'center',
  1822. columnLabel: '客户负责人',
  1823. columnHidden: false,
  1824. columnImage: false,
  1825. status: true,
  1826. fixed: '',
  1827. },
  1828. {
  1829. userId: this.$store.state.user.name,
  1830. functionId: 103001,
  1831. serialNumber: '103001Table5ContactPhoneNumber1',
  1832. tableId: '103001Table5',
  1833. tableName: '客户联系人表',
  1834. columnProp: 'contactPhoneNumber1',
  1835. headerAlign: 'center',
  1836. align: 'center',
  1837. columnLabel: '联系方式',
  1838. columnHidden: false,
  1839. columnImage: false,
  1840. status: true,
  1841. fixed: '',
  1842. },
  1843. {
  1844. userId: this.$store.state.user.name,
  1845. functionId: 103001,
  1846. serialNumber: '103001Table5PrimaryContact',
  1847. tableId: '103001Table5',
  1848. tableName: '客户联系人表',
  1849. columnProp: 'primaryContact',
  1850. headerAlign: 'center',
  1851. align: 'center',
  1852. columnLabel: '默认联系人',
  1853. columnHidden: false,
  1854. columnImage: false,
  1855. status: true,
  1856. fixed: '',
  1857. },
  1858. {
  1859. userId: this.$store.state.user.name,
  1860. functionId: 103001,
  1861. serialNumber: '103001Table5ContactStatus',
  1862. tableId: '103001Table5',
  1863. tableName: '客户联系人表',
  1864. columnProp: 'contactStatus',
  1865. headerAlign: 'center',
  1866. align: 'center',
  1867. columnLabel: '人员状态',
  1868. columnHidden: false,
  1869. columnImage: false,
  1870. status: true,
  1871. fixed: '',
  1872. },
  1873. ],
  1874. // ======== 必填规则 ========
  1875. rules: {
  1876. customerNo: [
  1877. {
  1878. required: true,
  1879. message: '客户编码不能为空',
  1880. trigger: ['change', 'blur']
  1881. }
  1882. ],
  1883. trackerName: [
  1884. {
  1885. required: true,
  1886. message: 'CS不能为空',
  1887. trigger: ['change', 'blur']
  1888. }
  1889. ],
  1890. proofingNumber: [
  1891. {
  1892. required: true,
  1893. message: '打印数量不能为空',
  1894. trigger: ['change', 'blur']
  1895. }
  1896. ],
  1897. projectId: [
  1898. {
  1899. required: true,
  1900. message: '项目编码不能为空',
  1901. trigger: ['change', 'blur']
  1902. }
  1903. ],
  1904. engineerName: [
  1905. {
  1906. required: true,
  1907. message: 'NPI工程师不能为空',
  1908. trigger: ['change', 'blur']
  1909. }
  1910. ],
  1911. priorityLevel: [
  1912. {
  1913. required: true,
  1914. message: '优先等级不能为空',
  1915. trigger: ['change', 'blur']
  1916. }
  1917. ],
  1918. requiredDeliveryDate: [
  1919. {
  1920. required: true,
  1921. message: '要求交付日期不能为空',
  1922. trigger: ['change', 'blur']
  1923. }
  1924. ]
  1925. },
  1926. enterResultRules: {
  1927. actualityDeliveryDate: [
  1928. {
  1929. required: true,
  1930. message: ' ',
  1931. trigger: 'change'
  1932. }
  1933. ],
  1934. proofingResultInformation: [
  1935. {
  1936. required: true,
  1937. message: ' ',
  1938. trigger: 'change'
  1939. }
  1940. ]
  1941. },
  1942. submitResultRules: {
  1943. actualitySendSamplesDate: [
  1944. {
  1945. required: true,
  1946. message: ' ',
  1947. trigger: 'change'
  1948. }
  1949. ],
  1950. sendSamplesMethod: [
  1951. {
  1952. required: true,
  1953. message: ' ',
  1954. trigger: 'change'
  1955. }
  1956. ]
  1957. },
  1958. customerResponseRules: {
  1959. actualityReplyDate: [
  1960. {
  1961. required: true,
  1962. message: ' ',
  1963. trigger: 'change'
  1964. }
  1965. ],
  1966. confirmResults: [
  1967. {
  1968. required: true,
  1969. message: ' ',
  1970. trigger: 'change'
  1971. }
  1972. ],
  1973. confirmBy: [
  1974. {
  1975. required: true,
  1976. message: ' ',
  1977. trigger: 'change'
  1978. }
  1979. ]
  1980. },
  1981. // ======== 复选数据集 ========
  1982. proofingSelections: [],
  1983. projectPartListSelections: [],
  1984. // ======== 选中的当前行数据 ========
  1985. proofingCurrentRow: {},
  1986. // ======== 模态框开关控制 ========
  1987. modalFlag: false,
  1988. modalDisableFlag: false,
  1989. enterResultModalFlag: false,
  1990. submitResultModalFlag: false,
  1991. customerResponseModalFlag: false,
  1992. // 选择项目弹框开关
  1993. chooseProjectListFlag: false,
  1994. //项目搜索条件
  1995. searchProjectData: {
  1996. site: this.$store.state.user.site,
  1997. projectId: undefined,
  1998. projectName: undefined,
  1999. customerId: undefined,
  2000. },
  2001. // 项目集合
  2002. projectList: [],
  2003. addressModelFlag: false,
  2004. contactModelFlag: false,
  2005. columnFieldList1: [],
  2006. columnFieldList2: [],
  2007. ossColumns: [
  2008. {
  2009. userId: this.$store.state.user.name,
  2010. functionId: 103001,
  2011. serialNumber: '103001Table2FileName',
  2012. tableId: '103001Table2',
  2013. tableName: '文件信息表',
  2014. columnProp: 'fileName',
  2015. headerAlign: 'center',
  2016. align: 'center',
  2017. columnLabel: '文件名称',
  2018. columnHidden: false,
  2019. columnImage: false,
  2020. columnSortable: false,
  2021. sortLv: 0,
  2022. status: true,
  2023. fixed: '',
  2024. columnWidth: 140
  2025. },
  2026. {
  2027. userId: this.$store.state.user.name,
  2028. functionId: 103001,
  2029. serialNumber: '103001Table2FileRemark',
  2030. tableId: '103001Table2',
  2031. tableName: '文件信息表',
  2032. columnProp: 'fileRemark',
  2033. headerAlign: 'center',
  2034. align: 'center',
  2035. columnLabel: '备注',
  2036. columnHidden: false,
  2037. columnImage: false,
  2038. columnSortable: false,
  2039. sortLv: 0,
  2040. status: true,
  2041. fixed: '',
  2042. columnWidth: 240
  2043. },
  2044. // {
  2045. // userId: this.$store.state.user.name,
  2046. // functionId: 103001,
  2047. // serialNumber: '103001Table2OrderRef3',
  2048. // tableId: '103001Table2',
  2049. // tableName: '文件信息表',
  2050. // columnProp: 'orderRef3',
  2051. // headerAlign: 'center',
  2052. // align: 'center',
  2053. // columnLabel: '文件描述',
  2054. // columnHidden: false,
  2055. // columnImage: false,
  2056. // columnSortable: false,
  2057. // sortLv: 0,
  2058. // status: true,
  2059. // fixed: '',
  2060. // columnWidth: 120
  2061. // },
  2062. {
  2063. userId: this.$store.state.user.name,
  2064. functionId: 103001,
  2065. serialNumber: '103001Table2CreateDate',
  2066. tableId: '103001Table2',
  2067. tableName: '文件信息表',
  2068. columnProp: 'createDate',
  2069. headerAlign: 'center',
  2070. align: 'center',
  2071. columnLabel: '上传时间',
  2072. columnHidden: false,
  2073. columnImage: false,
  2074. columnSortable: false,
  2075. sortLv: 0,
  2076. status: true,
  2077. fixed: '',
  2078. columnWidth: 140
  2079. },
  2080. {
  2081. userId: this.$store.state.user.name,
  2082. functionId: 103001,
  2083. serialNumber: '103001Table2CreatedBy',
  2084. tableId: '103001Table2',
  2085. tableName: '文件信息表',
  2086. columnProp: 'createBy',
  2087. headerAlign: 'center',
  2088. align: 'center',
  2089. columnLabel: '上传人',
  2090. columnHidden: false,
  2091. columnImage: false,
  2092. columnSortable: false,
  2093. sortLv: 0,
  2094. status: true,
  2095. fixed: '',
  2096. columnWidth: 140
  2097. }
  2098. ],
  2099. rejectVisible: false,
  2100. rejectOpinion: '',
  2101. detailVisible:false,
  2102. no:1,
  2103. size:20,
  2104. total:0,
  2105. queryLoading:false,
  2106. }
  2107. },
  2108. mounted() {
  2109. this.$nextTick(() => {
  2110. this.height = window.innerHeight / 2 - 100;
  2111. /*第二个表格高度的动态调整*/
  2112. this.secondHeight = window.innerHeight / 2 - 206;
  2113. })
  2114. },
  2115. created() {
  2116. this.handleRouteQuery();
  2117. },
  2118. activated() {
  2119. this.handleRouteQuery();
  2120. },
  2121. methods: {
  2122. handleRouteQuery() {
  2123. if (this.$route.params.type === 'tokenLogin') {
  2124. let params = {
  2125. site: this.$route.params.site,
  2126. proofingNo: this.$route.params.docNo,
  2127. limit: this.pageSize,
  2128. createBy: this.$store.state.user.name,
  2129. page: 1,
  2130. }
  2131. this.dataListLoading = true
  2132. proofingInformationSearch(params).then(({data}) => {
  2133. if (data && data.code === 0) {
  2134. this.dataList = data.page.list
  2135. this.totalPage = data.page.totalCount
  2136. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2137. // 判断是否全部存在数据
  2138. if (this.totalPage > 0) {
  2139. //设置选中行
  2140. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2141. //加载当前的页签的table
  2142. this.refreshCurrentTabTable()
  2143. this.proofingClickRow(this.dataList[0])
  2144. this.updateModal(this.dataList[0])
  2145. } else {
  2146. //设置选中行
  2147. this.$refs.proofingTable.setCurrentRow({})
  2148. // 加载当前的页签的table
  2149. this.refreshCurrentTabTable()
  2150. this.testClickRow({})
  2151. }
  2152. }
  2153. this.dataListLoading = false
  2154. })
  2155. } else if (this.$route.params.proofingNo) {
  2156. this.searchData.proofingNo = this.$route.params.proofingNo
  2157. this.getDataList();
  2158. setTimeout(() => {
  2159. this.searchData.proofingNo = ''
  2160. }, 200)
  2161. } else {
  2162. this.getDataList();
  2163. }
  2164. },
  2165. // ======== 分页相关方法 ========
  2166. /**
  2167. * 每页数
  2168. * @param val
  2169. */
  2170. sizeChangeHandle(val) {
  2171. this.pageSize = val
  2172. this.pageIndex = 1
  2173. this.getDataList()
  2174. },
  2175. /**
  2176. * 当前页
  2177. * @param val
  2178. */
  2179. currentChangeHandle(val) {
  2180. this.pageIndex = val
  2181. this.getDataList()
  2182. },
  2183. // ======== 复选框操作相关方法 ========
  2184. /**
  2185. * 选中一行
  2186. * @param row
  2187. */
  2188. projectPartClickRow(row) {
  2189. if (this.modalData.flag === '1') {
  2190. this.$refs.projectPartTable.toggleRowSelection(row);
  2191. this.confirmProjectPart();
  2192. }
  2193. },
  2194. /**
  2195. * 多选
  2196. * @param val
  2197. */
  2198. selectionProjectPart(val) {
  2199. this.projectPartListSelections = val
  2200. },
  2201. /**
  2202. * 获取唯一值一般都为 id
  2203. * @param row
  2204. * @returns {*}
  2205. */
  2206. getRowKeys(row) {
  2207. return row.testPartNo;
  2208. },
  2209. /**
  2210. * 未知
  2211. * @returns {boolean}
  2212. */
  2213. selectFlag() {
  2214. return true;
  2215. },
  2216. // ======== 页签切换相关方法 ========
  2217. /**
  2218. * 列表表格选择替换
  2219. * @param tab
  2220. * @param event
  2221. */
  2222. tabClick(tab, event) {
  2223. // 刷新列表数据
  2224. this.refreshCurrentTabTable()
  2225. },
  2226. /**
  2227. * 当前值发生变化的时候修改
  2228. * @param row
  2229. * @param oldRow
  2230. */
  2231. changeCurrentRow(row, oldRow) {
  2232. // 判断是否是获取焦点的事件
  2233. if (row) {
  2234. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2235. //刷新当前页表
  2236. this.refreshCurrentTabTable()
  2237. }
  2238. },
  2239. /**
  2240. * 刷新页签的table数据
  2241. */
  2242. refreshCurrentTabTable() {
  2243. if (this.activeTable === 'proofing_result') {
  2244. this.getProofingResult()
  2245. } else if (this.activeTable === 'project_information') {
  2246. this.getProjectInformation()
  2247. } else if (this.activeTable === 'customer_information') {
  2248. this.getCustomerInformation()
  2249. }
  2250. // else if (this.activeTable === 'proofing_file') {
  2251. // this.getProofingFile()
  2252. // }
  2253. },
  2254. // getProofingFile(){
  2255. //
  2256. // },
  2257. // ======== 列表数据刷新方法 ========
  2258. /**
  2259. * 获取数据列表
  2260. */
  2261. getDataList() {
  2262. if (localStorage.getItem('proofingData') !== undefined) {
  2263. let data = JSON.parse(localStorage.getItem('proofingData'));
  2264. if (data) {
  2265. this.searchData.proofingNo = data.proofingNo
  2266. }
  2267. localStorage.removeItem('proofingData');
  2268. }
  2269. this.searchData.limit = this.pageSize
  2270. this.searchData.page = this.pageIndex
  2271. let params = {
  2272. ...this.searchData,
  2273. createBy: this.$store.state.user.name,
  2274. }
  2275. proofingInformationSearch(params).then(({data}) => {
  2276. if (data.code === 0) {
  2277. this.dataList = data.page.list
  2278. this.pageIndex = data.page.currPage
  2279. this.pageSize = data.page.pageSize
  2280. this.totalPage = data.page.totalCount
  2281. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2282. // 判断是否全部存在数据
  2283. if (this.totalPage > 0) {
  2284. //设置选中行
  2285. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2286. //加载当前的页签的table
  2287. this.refreshCurrentTabTable()
  2288. this.proofingClickRow(this.dataList[0])
  2289. } else {
  2290. //设置选中行
  2291. this.$refs.proofingTable.setCurrentRow({})
  2292. // 加载当前的页签的table
  2293. this.refreshCurrentTabTable()
  2294. this.testClickRow({})
  2295. }
  2296. }
  2297. this.dataListLoading = false
  2298. })
  2299. },
  2300. /**
  2301. * 获取打样结果列表
  2302. */
  2303. getProofingResult() {
  2304. let tempData = {
  2305. site: this.$store.state.user.site,
  2306. proofingNo: this.proofingCurrentRow.proofingNo
  2307. }
  2308. // 打样结果对象
  2309. proofingResultSearch(tempData).then(({data}) => {
  2310. if (data && data.code === 0) {
  2311. this.proofingResultData = data.rows[0]
  2312. } else {
  2313. this.proofingResultData = {}
  2314. }
  2315. })
  2316. // 附件列表
  2317. this.getFileContentData()
  2318. },
  2319. /**
  2320. * 获取项目信息
  2321. */
  2322. getProjectInformation() {
  2323. let tempData = {
  2324. site: this.$store.state.user.site,
  2325. projectId: this.proofingCurrentRow.projectId
  2326. }
  2327. // 报价结果对象
  2328. getProjectInformation(tempData).then(({data}) => {
  2329. if (data && data.code === 0) {
  2330. this.projectInformationData = data.rows[0]
  2331. } else {
  2332. this.projectInformationData = {}
  2333. }
  2334. })
  2335. },
  2336. /**
  2337. * 获取客户信息
  2338. */
  2339. getCustomerInformation() {
  2340. let tempData = {
  2341. site: this.$store.state.user.site,
  2342. customerNo: this.proofingCurrentRow.customerNo
  2343. }
  2344. // 报价结果对象
  2345. getCustomerInformation(tempData).then(({data}) => {
  2346. if (data && data.code === 0) {
  2347. this.customerInformationData = data.rows[0]
  2348. } else {
  2349. this.customerInformationData = {}
  2350. }
  2351. })
  2352. },
  2353. // ======== 新增/编辑模态框 ========
  2354. /**
  2355. * 报价信息新增模态框
  2356. */
  2357. addModal() {
  2358. this.searchDelegateAccessByUser();
  2359. this.modalDisableFlag = false
  2360. this.modalFlag = true
  2361. },
  2362. /**
  2363. * 报价信息编辑模态框
  2364. * @param row
  2365. */
  2366. async updateModal(row) {
  2367. await this.getNodeAuthority(row)
  2368. this.modalData = {
  2369. flag: '2',
  2370. title: '打样编辑-' + row.proofingNo,
  2371. site: row.site,
  2372. proofingNo: row.proofingNo,
  2373. customerNo: row.customerNo,
  2374. customerDesc: row.customerDesc,
  2375. projectId: row.projectId,
  2376. projectName: row.projectName,
  2377. tracker: row.tracker,
  2378. trackerName: row.trackerName,
  2379. testPartNo: row.testPartNo,
  2380. partName: row.partName,
  2381. engineer: row.engineer,
  2382. engineerName: row.engineerName,
  2383. approver: row.approver,
  2384. approverName: row.approverName,
  2385. priorityLevel: row.priorityLevel,
  2386. proofingNumber: row.proofingNumber,
  2387. requiredDeliveryDate: row.requiredDeliveryDate,
  2388. remark: row.remark,
  2389. technicalConsiderations: row.technicalConsiderations,
  2390. isNeedToSendSamples: row.isNeedToSendSamples,
  2391. sendSamplesAddress: row.sendSamplesAddress,
  2392. consignee: row.consignee,
  2393. consigneeContact: row.consigneeContact,
  2394. actualityDeliveryDate: row.actualityDeliveryDate,
  2395. proofingResultInformation: row.proofingResultInformation,
  2396. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2397. sendSamplesMethod: row.sendSamplesMethod,
  2398. deliverGoodsInformation: row.deliverGoodsInformation,
  2399. deliverGoodsRemark: row.deliverGoodsRemark,
  2400. actualityReplyDate: row.actualityReplyDate,
  2401. confirmResults: row.confirmResults,
  2402. confirmBy: row.confirmBy,
  2403. confirmInformation: row.confirmInformation,
  2404. proofingStatus: row.proofingStatus,
  2405. proofingResultStatus: row.proofingResultStatus,
  2406. nextToDo: row.nextToDo,
  2407. updateBy: this.$store.state.user.name,
  2408. nodeConclusion: '',
  2409. stepId: row.stepId,
  2410. rejectFlag: row.rejectFlag,
  2411. rejectStepId: row.rejectStepId,
  2412. isReject: row.isReject,
  2413. nodeId: row.nodeId
  2414. }
  2415. this.searchDelegateAccessByUser();
  2416. this.modalDisableFlag = true
  2417. this.modalFlag = true
  2418. },
  2419. async getDetailData(row) {
  2420. this.detailVisible = true
  2421. await this.getNodeAuthority(row)
  2422. this.modalData = {
  2423. flag: '2',
  2424. title: '打样编辑-' + row.proofingNo,
  2425. site: row.site,
  2426. proofingNo: row.proofingNo,
  2427. customerNo: row.customerNo,
  2428. customerDesc: row.customerDesc,
  2429. projectId: row.projectId,
  2430. projectName: row.projectName,
  2431. tracker: row.tracker,
  2432. trackerName: row.trackerName,
  2433. testPartNo: row.testPartNo,
  2434. partName: row.partName,
  2435. engineer: row.engineer,
  2436. engineerName: row.engineerName,
  2437. approver: row.approver,
  2438. approverName: row.approverName,
  2439. priorityLevel: row.priorityLevel,
  2440. proofingNumber: row.proofingNumber,
  2441. requiredDeliveryDate: row.requiredDeliveryDate,
  2442. remark: row.remark,
  2443. technicalConsiderations: row.technicalConsiderations,
  2444. isNeedToSendSamples: row.isNeedToSendSamples,
  2445. sendSamplesAddress: row.sendSamplesAddress,
  2446. consignee: row.consignee,
  2447. consigneeContact: row.consigneeContact,
  2448. actualityDeliveryDate: row.actualityDeliveryDate,
  2449. proofingResultInformation: row.proofingResultInformation,
  2450. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2451. sendSamplesMethod: row.sendSamplesMethod,
  2452. deliverGoodsInformation: row.deliverGoodsInformation,
  2453. deliverGoodsRemark: row.deliverGoodsRemark,
  2454. actualityReplyDate: row.actualityReplyDate,
  2455. confirmResults: row.confirmResults,
  2456. confirmBy: row.confirmBy,
  2457. confirmInformation: row.confirmInformation,
  2458. proofingStatus: row.proofingStatus,
  2459. proofingResultStatus: row.proofingResultStatus,
  2460. nextToDo: row.nextToDo,
  2461. updateBy: this.$store.state.user.name,
  2462. nodeConclusion: '',
  2463. stepId: row.stepId,
  2464. rejectFlag: row.rejectFlag,
  2465. rejectStepId: row.rejectStepId,
  2466. isReject: row.isReject,
  2467. nodeId: row.nodeId
  2468. }
  2469. this.searchDelegateAccessByUser();
  2470. this.modalDisableFlag = true
  2471. this.modalFlag = true
  2472. },
  2473. // ======== 新增/编辑/删除方法 ========
  2474. /**
  2475. * 获取项目物料列表
  2476. */
  2477. openModalDialog() {
  2478. if (this.modalData.proofingNo) {
  2479. this.searchDelegateAccess();
  2480. }
  2481. if (this.modalData.flag !== '1'){
  2482. this.projectPartData.testPartNo = this.modalData.testPartNo;
  2483. }else {
  2484. this.projectPartData.testPartNo = '';
  2485. }
  2486. this.getProjectPartList();
  2487. },
  2488. getProjectPartList() {
  2489. if (!this.modalData.projectId) {
  2490. this.projectPartList = [];
  2491. return
  2492. }
  2493. // 先清空缓存选中
  2494. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2495. // 拿到选中的产品编号
  2496. let projectPartList = this.modalData.testPartNo.split(';')
  2497. this.projectPartData.projectId = this.modalData.projectId;
  2498. // 查询所有项目物料
  2499. let params = {
  2500. ...this.projectPartData,
  2501. no:this.no,
  2502. size:this.size,
  2503. }
  2504. this.queryLoading = true
  2505. getProjectPartList(params).then(({data}) => {
  2506. if (data && data.code === 0) {
  2507. this.projectPartList = data.rows
  2508. this.total = data.total
  2509. this.projectPartList.forEach(val => {
  2510. // 回显选中的项目物料
  2511. if (projectPartList.includes(val.testPartNo)) {
  2512. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2513. }
  2514. })
  2515. // this.projectPartModelFlag = true
  2516. } else {
  2517. this.$message.warning(data.msg)
  2518. }
  2519. this.queryLoading = false
  2520. }).catch(error => {
  2521. this.queryLoading = false
  2522. this.$message.error(error)
  2523. })
  2524. },
  2525. /**
  2526. * 确认多选项目物料
  2527. */
  2528. confirmProjectPart() {
  2529. this.modalData.testPartNo = ''
  2530. this.modalData.partName = ''
  2531. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2532. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2533. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2534. }
  2535. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2536. this.modalData.partName = this.modalData.partName.substring(1)
  2537. this.projectPartModelFlag = false
  2538. },
  2539. /**
  2540. * 客户信息新增/编辑
  2541. */
  2542. saveData() {
  2543. this.$refs.modalForm.validate((valid, obj) => {
  2544. if (!valid) {
  2545. Object.keys(obj).forEach(val => {
  2546. this.$message.warning(obj[val][0].message)
  2547. })
  2548. } else {
  2549. if (this.projectPartListSelections.length <= 0) {
  2550. this.$message.warning('请选择项目料号')
  2551. return
  2552. }
  2553. this.confirmProjectPart();
  2554. // 将选中的 人员信息添加到请求
  2555. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2556. if (this.modalData.flag === '1') {
  2557. this.saveProofing()
  2558. } else {
  2559. this.updateProofing()
  2560. }
  2561. }
  2562. })
  2563. },
  2564. updateProofing() {
  2565. proofingInformationEdit(this.modalData).then(({data}) => {
  2566. if (data && data.code === 0) {
  2567. this.getDataList()
  2568. this.modalFlag = false
  2569. this.$message({
  2570. message: '操作成功',
  2571. type: 'success',
  2572. duration: 1500,
  2573. onClose: () => {
  2574. }
  2575. })
  2576. } else {
  2577. this.$alert(data.msg, '错误', {
  2578. confirmButtonText: '确定'
  2579. })
  2580. }
  2581. })
  2582. },
  2583. saveProofing() {
  2584. proofingInformationSave(this.modalData).then(({data}) => {
  2585. if (data && data.code === 0) {
  2586. this.getDataList()
  2587. this.modalFlag = false
  2588. this.$message({
  2589. message: '操作成功',
  2590. type: 'success',
  2591. duration: 1500,
  2592. onClose: () => {
  2593. }
  2594. })
  2595. } else {
  2596. this.$alert(data.msg, '错误', {
  2597. confirmButtonText: '确定'
  2598. })
  2599. }
  2600. })
  2601. },
  2602. /**
  2603. * 验证必填项
  2604. */
  2605. validateDataValue() {
  2606. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2607. this.$message.warning('请选择客户编码!')
  2608. return
  2609. }
  2610. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2611. this.$message.warning('请选择客户名称!')
  2612. return
  2613. }
  2614. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2615. this.$message.warning('请选择CS编码!')
  2616. return
  2617. }
  2618. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2619. this.$message.warning('请选择CS名称!')
  2620. return
  2621. }
  2622. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2623. this.$message.warning('请选择项目编码!')
  2624. return
  2625. }
  2626. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2627. this.$message.warning('请选择项目名称!')
  2628. return
  2629. }
  2630. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2631. // this.$message.warning('请选择工程师编码!')
  2632. // return
  2633. // }
  2634. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2635. // this.$message.warning('请选择工程师名称!')
  2636. // return
  2637. // }
  2638. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2639. this.$message.warning('请输入正确的打样数量!')
  2640. return
  2641. }
  2642. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2643. // this.$message.warning('请选择优先等级!')
  2644. // return
  2645. // }
  2646. if (!this.modalData.requiredDeliveryDate) {
  2647. this.$message.warning('请输入要求交付日期!')
  2648. return
  2649. }
  2650. },
  2651. /**
  2652. * 打样信息删除
  2653. */
  2654. delModal() {
  2655. if (this.proofingSelections.length === 0) {
  2656. this.$message.warning('请勾选要删除的打样信息!')
  2657. return
  2658. }
  2659. for (let i = 0; i < this.proofingSelections.length; i++) {
  2660. let row = this.proofingSelections[i]
  2661. if (row.proofingStatus !== '草稿') {
  2662. this.$message.warning(row.proofingNo + "不是草稿状态,不能删除!")
  2663. return
  2664. }
  2665. }
  2666. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2667. confirmButtonText: '确定',
  2668. cancelButtonText: '取消',
  2669. type: 'warning'
  2670. }).then(() => {
  2671. let tempData = {
  2672. informationList: this.proofingSelections
  2673. }
  2674. proofingInformationDelete(tempData).then(({data}) => {
  2675. if (data && data.code === 0) {
  2676. this.getDataList()
  2677. this.proofingSelections = []
  2678. this.$message({
  2679. message: '操作成功',
  2680. type: 'success',
  2681. duration: 1500,
  2682. onClose: () => {
  2683. }
  2684. })
  2685. } else {
  2686. this.$alert(data.msg, '错误', {
  2687. confirmButtonText: '确定'
  2688. })
  2689. }
  2690. })
  2691. }).catch(() => {
  2692. })
  2693. },
  2694. // ======== 列表操作方法 ========
  2695. /**
  2696. * 单机选中报价信息
  2697. * @param row
  2698. */
  2699. proofingClickRow(row) {
  2700. // this.$refs.proofingTable.toggleRowSelection(row)
  2701. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2702. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2703. this.getApprovalList()
  2704. },
  2705. /**
  2706. * 复选报价信息
  2707. * @param val
  2708. */
  2709. selectionProofing(val) {
  2710. this.proofingSelections = val
  2711. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2712. },
  2713. // ======== 报价结果相关方法 ========
  2714. /**
  2715. * 封装录入方法
  2716. */
  2717. packProofingResultModal() {
  2718. // 重置对象
  2719. this.enterResultData = {
  2720. site: this.$store.state.user.site,
  2721. proofingNo: '',
  2722. actualityDeliveryDate: new Date(),
  2723. proofingResultInformation: '',
  2724. proofingResultStatus: 'E',
  2725. fileContentList: [],
  2726. updateBy: this.$store.state.user.name
  2727. }
  2728. // 获得选中的打样号
  2729. // if (this.proofingSelections.length > 0) {
  2730. // this.proofingSelections.forEach(val => {
  2731. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2732. // })
  2733. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2734. // } else {
  2735. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2736. // }
  2737. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2738. // // 获得这些打样号的全部附件
  2739. // this.getFileContentList()
  2740. this.enterResultModalFlag = true
  2741. },
  2742. /**
  2743. * 录入打样结果
  2744. */
  2745. proofingResultModal() {
  2746. // // 如果有选中打样单
  2747. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2748. // let tempData = {
  2749. // currentStatus: 'C',
  2750. // informationList: this.proofingSelections,
  2751. // }
  2752. // // 检查打样单状态
  2753. // checkProofingStatus(tempData).then(({data}) => {
  2754. // if (data && data.code === 0) {
  2755. // if (data.flag === 1) { // 状态一致
  2756. // this.packProofingResultModal()
  2757. // } else { // 状态不同
  2758. // this.$message.warning('选中的打样单进度有误,请确认!')
  2759. // }
  2760. // } else {
  2761. // this.$alert(data.msg, '错误', {
  2762. // confirmButtonText: '确定'
  2763. // })
  2764. // }
  2765. // })
  2766. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2767. // this.packProofingResultModal()
  2768. // }
  2769. this.packProofingResultModal()
  2770. },
  2771. /**
  2772. * 保存打样结果
  2773. */
  2774. saveProofingResult() {
  2775. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2776. this.$message.warning('请选择实际交付日期!')
  2777. return
  2778. }
  2779. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2780. this.$message.warning('请填写打样结果信息!')
  2781. return
  2782. }
  2783. // if (this.proofingSelections.length > 1) {
  2784. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2785. // confirmButtonText: '确定',
  2786. // cancelButtonText: '取消',
  2787. // type: 'warning'
  2788. // }).then(() => {
  2789. // saveProofingResult(this.enterResultData).then(({data}) => {
  2790. // if (data && data.code === 0) {
  2791. // this.getDataList()
  2792. // this.enterResultModalFlag = false
  2793. // this.$message({
  2794. // message: '操作成功',
  2795. // type: 'success',
  2796. // duration: 1500,
  2797. // onClose: () => {}
  2798. // })
  2799. // } else {
  2800. // this.$alert(data.msg, '错误', {
  2801. // confirmButtonText: '确定'
  2802. // })
  2803. // }
  2804. // })
  2805. // }).catch(() => {
  2806. // })
  2807. // } else {
  2808. saveProofingResult(this.enterResultData).then(({data}) => {
  2809. if (data && data.code === 0) {
  2810. this.getDataList()
  2811. this.enterResultModalFlag = false
  2812. this.$message({
  2813. message: '操作成功',
  2814. type: 'success',
  2815. duration: 1500,
  2816. onClose: () => {
  2817. }
  2818. })
  2819. } else {
  2820. this.$alert(data.msg, '错误', {
  2821. confirmButtonText: '确定'
  2822. })
  2823. }
  2824. })
  2825. // }
  2826. },
  2827. /**
  2828. * 封装送样方法
  2829. */
  2830. packSubmitProofingModal() {
  2831. this.submitResultData = {
  2832. site: this.$store.state.user.site,
  2833. proofingNo: '',
  2834. actualitySendSamplesDate: new Date(),
  2835. sendSamplesMethod: '',
  2836. deliverGoodsInformation: '',
  2837. deliverGoodsRemark: '',
  2838. proofingResultStatus: 'S',
  2839. updateBy: this.$store.state.user.name,
  2840. }
  2841. // 获得选中的打样号
  2842. // if (this.proofingSelections.length > 0) {
  2843. // this.proofingSelections.forEach(val => {
  2844. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2845. // })
  2846. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2847. // } else {
  2848. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2849. // }
  2850. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2851. this.submitResultModalFlag = true
  2852. },
  2853. /**
  2854. * 提交送样信息
  2855. */
  2856. submitProofingModal() {
  2857. // // 如果有选中打样单
  2858. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2859. // let tempData = {
  2860. // currentStatus: 'E',
  2861. // informationList: this.proofingSelections,
  2862. // }
  2863. // // 检查打样单状态
  2864. // checkProofingStatus(tempData).then(({data}) => {
  2865. // if (data && data.code === 0) {
  2866. // if (data.flag === 1) { // 状态一致
  2867. // this.packSubmitProofingModal()
  2868. // } else { // 状态不同
  2869. // this.$message.warning('选中的打样单进度有误,请确认!')
  2870. // }
  2871. // } else {
  2872. // this.$alert(data.msg, '错误', {
  2873. // confirmButtonText: '确定'
  2874. // })
  2875. // }
  2876. // })
  2877. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2878. // this.packSubmitProofingModal()
  2879. // }
  2880. this.packSubmitProofingModal()
  2881. },
  2882. /**
  2883. * 保存送样结果
  2884. */
  2885. saveSubmitResult() {
  2886. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2887. this.$message.warning('请选择实际送样日期!')
  2888. return
  2889. }
  2890. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2891. this.$message.warning('请选择送样方式!')
  2892. return
  2893. }
  2894. // if (this.proofingSelections.length > 1) {
  2895. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  2896. // confirmButtonText: '确定',
  2897. // cancelButtonText: '取消',
  2898. // type: 'warning'
  2899. // }).then(() => {
  2900. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2901. // if (data && data.code === 0) {
  2902. // this.getDataList()
  2903. // this.submitResultModalFlag = false
  2904. // this.$message({
  2905. // message: '操作成功',
  2906. // type: 'success',
  2907. // duration: 1500,
  2908. // onClose: () => {}
  2909. // })
  2910. // } else {
  2911. // this.$alert(data.msg, '错误', {
  2912. // confirmButtonText: '确定'
  2913. // })
  2914. // }
  2915. // })
  2916. // }).catch(() => {
  2917. // })
  2918. // } else {
  2919. saveSubmitResult(this.submitResultData).then(({data}) => {
  2920. if (data && data.code === 0) {
  2921. this.getDataList()
  2922. this.submitResultModalFlag = false
  2923. this.$message({
  2924. message: '操作成功',
  2925. type: 'success',
  2926. duration: 1500,
  2927. onClose: () => {
  2928. }
  2929. })
  2930. } else {
  2931. this.$alert(data.msg, '错误', {
  2932. confirmButtonText: '确定'
  2933. })
  2934. }
  2935. })
  2936. // }
  2937. },
  2938. /**
  2939. * 封装回复方法
  2940. */
  2941. packCustomerResponseModal() {
  2942. this.customerResponseData = {
  2943. site: this.$store.state.user.site,
  2944. proofingNo: '',
  2945. actualityReplyDate: new Date(),
  2946. confirmResults: '接受',
  2947. confirmBy: '',
  2948. confirmInformation: '',
  2949. proofingResultStatus: 'R',
  2950. updateBy: this.$store.state.user.name
  2951. }
  2952. // 获得选中的打样号
  2953. // if (this.proofingSelections.length > 0) {
  2954. // this.proofingSelections.forEach(val => {
  2955. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  2956. // })
  2957. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  2958. // } else {
  2959. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2960. // }
  2961. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2962. this.customerResponseModalFlag = true
  2963. },
  2964. /**
  2965. * 客户回复
  2966. */
  2967. customerResponseModal() {
  2968. // // 如果有选中打样单
  2969. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2970. // let tempData = {
  2971. // currentStatus: 'S',
  2972. // informationList: this.proofingSelections,
  2973. // }
  2974. // // 检查打样单状态
  2975. // checkProofingStatus(tempData).then(({data}) => {
  2976. // if (data && data.code === 0) {
  2977. // if (data.flag === 1) { // 状态一致
  2978. // this.packCustomerResponseModal()
  2979. // } else { // 状态不同
  2980. // this.$message.warning('选中的打样单进度有误,请确认!')
  2981. // }
  2982. // } else {
  2983. // this.$alert(data.msg, '错误', {
  2984. // confirmButtonText: '确定'
  2985. // })
  2986. // }
  2987. // })
  2988. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2989. // this.packCustomerResponseModal()
  2990. // }
  2991. this.packCustomerResponseModal()
  2992. },
  2993. /**
  2994. * 保存客户回复
  2995. */
  2996. saveCustomerResponse() {
  2997. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2998. this.$message.warning('请选择实际回复日期!')
  2999. return
  3000. }
  3001. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3002. this.$message.warning('请选择客户确认结果!')
  3003. return
  3004. }
  3005. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3006. this.$message.warning('请填写客户确认人!')
  3007. return
  3008. }
  3009. // if (this.proofingSelections.length > 1) {
  3010. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3011. // confirmButtonText: '确定',
  3012. // cancelButtonText: '取消',
  3013. // type: 'warning'
  3014. // }).then(() => {
  3015. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3016. // if (data && data.code === 0) {
  3017. // this.getDataList()
  3018. // this.customerResponseModalFlag = false
  3019. // this.$message({
  3020. // message: '操作成功',
  3021. // type: 'success',
  3022. // duration: 1500,
  3023. // onClose: () => {}
  3024. // })
  3025. // } else {
  3026. // this.$alert(data.msg, '错误', {
  3027. // confirmButtonText: '确定'
  3028. // })
  3029. // }
  3030. // })
  3031. // }).catch(() => {
  3032. // })
  3033. // } else {
  3034. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3035. if (data && data.code === 0) {
  3036. this.getDataList()
  3037. this.customerResponseModalFlag = false
  3038. this.$message({
  3039. message: '操作成功',
  3040. type: 'success',
  3041. duration: 1500,
  3042. onClose: () => {
  3043. }
  3044. })
  3045. } else {
  3046. this.$alert(data.msg, '错误', {
  3047. confirmButtonText: '确定'
  3048. })
  3049. }
  3050. })
  3051. // }
  3052. },
  3053. // ======== 报价单附件的相关方法 ========
  3054. /**
  3055. * 获取报价单附件列表
  3056. */
  3057. getFileContentData() {
  3058. let currentData = {
  3059. orderRef1: this.$store.state.user.site,
  3060. orderRef2: this.proofingCurrentRow.proofingNo
  3061. }
  3062. getFileContentList(currentData).then(({data}) => {
  3063. if (data && data.code === 0) {
  3064. this.fileContentList = data.rows
  3065. } else {
  3066. this.fileContentList = []
  3067. }
  3068. })
  3069. },
  3070. // /**
  3071. // * 获得这些报价号的全部附件
  3072. // */
  3073. // getFileContentList () {
  3074. // let currentData = {
  3075. // orderRef1: this.$store.state.user.site,
  3076. // orderRef2: this.enterResultData.proofingNo
  3077. // }
  3078. // getFileContentList(currentData).then(({data}) => {
  3079. // if (data && data.code === 0) {
  3080. // this.enterResultData.fileContentList = data.rows
  3081. // } else {
  3082. // this.enterResultData.fileContentList = []
  3083. // }
  3084. // })
  3085. // },
  3086. /**
  3087. * 上传文件
  3088. */
  3089. uploadFile() {
  3090. let currentData = {
  3091. titleCon: '打样附件上传',
  3092. site: this.$store.state.user.site,
  3093. createBy: this.$store.state.user.name,
  3094. proofingNo: this.enterResultData.proofingNo,
  3095. fileRemark: '',
  3096. folder: 'proofingFile',
  3097. // options: []
  3098. }
  3099. // let num = 0
  3100. // let arr = this.enterResultData.proofingNo.split(';')
  3101. // arr.forEach(val => {
  3102. // currentData.options.push({key: num++, value: val})
  3103. // })
  3104. //打开组件 去做新增业务
  3105. this.$nextTick(() => {
  3106. this.$refs.proofingUploadFile.init(currentData)
  3107. })
  3108. },
  3109. /**
  3110. * 文件删除
  3111. * @param row
  3112. */
  3113. deleteFile(row) {
  3114. this.$confirm('确定要删除此文件?', '提示', {
  3115. confirmButtonText: '确定',
  3116. cancelButtonText: '取消',
  3117. type: 'warning'
  3118. }).then(() => {
  3119. deleteProofingFile(row).then(({data}) => {
  3120. if (data && data.code === 0) {
  3121. this.getFileContentList()
  3122. this.$message({
  3123. message: '操作成功',
  3124. type: 'success',
  3125. duration: 1500,
  3126. onClose: () => {
  3127. }
  3128. })
  3129. } else {
  3130. this.$alert(data.msg, '错误', {
  3131. confirmButtonText: '确定'
  3132. })
  3133. }
  3134. })
  3135. }).catch(() => {
  3136. })
  3137. },
  3138. /**
  3139. * 文件下载
  3140. * @param row
  3141. */
  3142. downloadFile(row) {
  3143. downLoadQuotationFile(row).then(({data}) => {
  3144. // 不限制文件下载类型
  3145. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3146. // 下载文件名称
  3147. const fileName = row.fileName
  3148. // a标签下载
  3149. const linkNode = document.createElement('a')
  3150. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3151. linkNode.style.display = 'none'
  3152. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3153. document.body.appendChild(linkNode)
  3154. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3155. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3156. document.body.removeChild(linkNode)
  3157. })
  3158. },
  3159. /**
  3160. * 获取该客户的客户地址
  3161. */
  3162. getCustomerAddressList() {
  3163. let tempData = {
  3164. site: this.$store.state.user.site,
  3165. customerNo: this.modalData.customerNo,
  3166. addressType: 'A'
  3167. }
  3168. customerAddressSearch(tempData).then(({data}) => {
  3169. if (data && data.code === 0) {
  3170. this.addressList = data.rows
  3171. this.addressModelFlag = true
  3172. } else {
  3173. this.addressList = []
  3174. }
  3175. })
  3176. },
  3177. // 双击选择负责人
  3178. getAddressData(row) {
  3179. this.modalData.sendSamplesAddress = row.addressName
  3180. this.addressModelFlag = false
  3181. },
  3182. /**
  3183. * 获取该客户的客户负责人
  3184. */
  3185. getCustomerContactList() {
  3186. let tempData = {
  3187. site: this.$store.state.user.site,
  3188. customerNo: this.modalData.customerNo
  3189. }
  3190. customerContactSearch(tempData).then(({data}) => {
  3191. if (data && data.code === 0) {
  3192. this.contactList = data.rows
  3193. this.contactModelFlag = true
  3194. } else {
  3195. this.contactList = []
  3196. }
  3197. })
  3198. },
  3199. // 双击选择负责人
  3200. getContactData(row) {
  3201. this.modalData.consignee = row.contactName
  3202. this.modalData.consigneeContact = row.contactPhoneNumber1
  3203. this.contactModelFlag = false
  3204. },
  3205. // ======== chooseList相关方法 ========
  3206. /**
  3207. * 获取基础数据列表S
  3208. * @param val
  3209. * @param type
  3210. */
  3211. getBaseList(val, type) {
  3212. this.tagNo = val
  3213. this.tagNo1 = type
  3214. this.$nextTick(() => {
  3215. let strVal = ''
  3216. let conSql = ''
  3217. if (val === 102) {
  3218. if (type === 1) {
  3219. strVal = this.modalData.customerNo
  3220. }
  3221. }
  3222. // if (val === 103) {
  3223. // if(type === 1) {
  3224. // strVal = this.modalData.tracker
  3225. // }
  3226. // if(type === 2) {
  3227. // strVal = this.modalData.engineer
  3228. // }
  3229. // }
  3230. if (val === 104) {
  3231. if (type === 1) {
  3232. strVal = this.modalData.projectId
  3233. }
  3234. }
  3235. if (val === 2051) {
  3236. strVal = this.modalData.trackerName
  3237. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3238. }
  3239. if (val === 2052) {
  3240. strVal = this.modalData.engineerName
  3241. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3242. }
  3243. if (val === 2053) {
  3244. strVal = this.modalData.approverName
  3245. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3246. }
  3247. this.$refs.baseList.init(val, strVal, conSql)
  3248. })
  3249. },
  3250. /**
  3251. * 列表方法的回调
  3252. * @param val
  3253. */
  3254. getBaseData(val) {
  3255. if (this.tagNo === 102) {
  3256. if (this.tagNo1 === 1) {
  3257. if (val.Customer_no === this.modalData.customerNo) {
  3258. return
  3259. }
  3260. this.modalData.customerNo = val.Customer_no
  3261. this.modalData.customerDesc = val.Customer_desc
  3262. this.modalData.projectId = undefined
  3263. this.modalData.projectName = undefined
  3264. this.projectPartList = []
  3265. }
  3266. }
  3267. // if (this.tagNo === 103) {
  3268. // if(this.tagNo1 === 1) {
  3269. // this.modalData.tracker = val.username
  3270. // this.modalData.trackerName = val.user_display
  3271. // }
  3272. // if(this.tagNo1 === 2) {
  3273. // this.modalData.engineer = val.username
  3274. // this.modalData.engineerName = val.user_display
  3275. // }
  3276. // }
  3277. if (this.tagNo === 104) {
  3278. if (this.tagNo1 === 1) {
  3279. this.modalData.projectId = val.project_id
  3280. this.modalData.projectName = val.project_name
  3281. this.getProjectPartList();
  3282. }
  3283. }
  3284. if (this.tagNo === 2051) {
  3285. this.modalData.tracker = val.username
  3286. this.modalData.trackerName = val.user_display
  3287. }
  3288. if (this.tagNo === 2052) {
  3289. this.modalData.engineer = val.username
  3290. this.modalData.engineerName = val.user_display
  3291. }
  3292. if (this.tagNo === 2053) {
  3293. this.modalData.approver = val.username
  3294. this.modalData.approverName = val.user_display
  3295. }
  3296. },
  3297. // ======== 导出相关方法 ========
  3298. /**
  3299. * 导出excel
  3300. */
  3301. async createExportData() {
  3302. this.searchData.limit = -1
  3303. this.searchData.page = 1
  3304. await proofingInformationSearch(this.searchData).then(({data}) => {
  3305. this.resultList = data.page.list
  3306. })
  3307. return this.resultList
  3308. },
  3309. startDownload() {
  3310. },
  3311. finishDownload() {
  3312. },
  3313. fields() {
  3314. let json = '{'
  3315. this.columnList.forEach((item, index) => {
  3316. if (index === this.columnList.length - 1) {
  3317. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3318. } else {
  3319. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3320. }
  3321. })
  3322. json += '}'
  3323. let s = eval('(' + json + ')')
  3324. return s
  3325. },
  3326. closeModalDiaLog() {
  3327. this.$refs.modalForm.resetFields();
  3328. this.modalData = {
  3329. flag: '1',
  3330. title: '打样新增',
  3331. site: this.$store.state.user.site,
  3332. proofingNo: '',
  3333. customerNo: '',
  3334. customerDesc: '',
  3335. projectId: '',
  3336. projectName: '',
  3337. tracker: '',
  3338. trackerName: '',
  3339. approver: '',
  3340. approverName: '',
  3341. testPartNo: '',
  3342. partName: '',
  3343. engineer: '',
  3344. engineerName: '',
  3345. priorityLevel: '',
  3346. proofingNumber: 1,
  3347. requiredDeliveryDate: '',
  3348. remark: '',
  3349. technicalConsiderations: '',
  3350. isNeedToSendSamples: '',
  3351. sendSamplesAddress: '',
  3352. consignee: '',
  3353. consigneeContact: '',
  3354. actualityDeliveryDate: '',
  3355. proofingResultInformation: '',
  3356. actualitySendSamplesDate: '',
  3357. sendSamplesMethod: '',
  3358. deliverGoodsInformation: '',
  3359. deliverGoodsRemark: '',
  3360. actualityReplyDate: '',
  3361. confirmResults: '',
  3362. confirmBy: '',
  3363. confirmInformation: '',
  3364. proofingStatus: '草稿',
  3365. proofingResultStatus: 'B',
  3366. nextToDo: '',
  3367. createBy: this.$store.state.user.name,
  3368. nodeId: ''
  3369. };
  3370. this.selectionDelegateAccess = [];
  3371. this.projectPartList = [];
  3372. this.activeName = 'part'
  3373. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3374. this.proofingDelegateAccess[key] = '';
  3375. })
  3376. },
  3377. checkSelectable(row, index) {
  3378. if (this.modalData.flag === '1') {
  3379. return true
  3380. } else {
  3381. return false
  3382. }
  3383. },
  3384. projectClickRow(row) {
  3385. this.modalData.projectId = row.projectId
  3386. this.modalData.projectName = row.projectName
  3387. this.getProjectPartList()
  3388. this.chooseProjectListFlag = false
  3389. },
  3390. // 查询searchProjectInfoList
  3391. searchProjectInfoList() {
  3392. this.projectList = [];
  3393. this.searchProjectData.customerId = this.modalData.customerNo
  3394. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3395. if (data && data.code === 0) {
  3396. this.projectList = data.rows
  3397. } else {
  3398. this.projectList = []
  3399. }
  3400. }).catch((error) => {
  3401. this.$message.error('查询项目信息失败')
  3402. })
  3403. },
  3404. closeProjectInfoDialog() {
  3405. this.$refs.closeProjectInfoForm.resetFields();
  3406. this.searchProjectData = {
  3407. site: this.$store.state.user.site,
  3408. projectId: undefined,
  3409. projectName: undefined,
  3410. customerId: undefined,
  3411. }
  3412. },
  3413. rowStyle({row}) {
  3414. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3415. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3416. }
  3417. },
  3418. updateModalStatus(row, status) {
  3419. this.$confirm(`是否确认下达?`, '提示', {
  3420. confirmButtonText: '确定',
  3421. cancelButtonText: '取消',
  3422. type: 'warning'
  3423. }).then(() => {
  3424. let params = JSON.parse(JSON.stringify(row))
  3425. params.proofingResultStatus = status;
  3426. params.proofingStatus = '下达';
  3427. params.userName = this.$store.state.user.name
  3428. params.menuId = this.$route.meta.menuId
  3429. proofingInformationEditStatus(params).then(({data}) => {
  3430. if (data && data.code === 0) {
  3431. this.getDataList()
  3432. this.modalFlag = false
  3433. this.$message.success('打样单已下达')
  3434. } else {
  3435. this.$alert(data.msg, '错误', {
  3436. confirmButtonText: '确定'
  3437. })
  3438. }
  3439. })
  3440. })
  3441. },
  3442. searchDelegateAccessByUser() {
  3443. // 角色 ROO7 的用户
  3444. let params = {
  3445. ...this.proofingDelegateAccess,
  3446. site: this.$store.state.user.site,
  3447. }
  3448. searchDelegateAccessByUser(params).then(({data}) => {
  3449. if (data && data.code === 0) {
  3450. this.baseDelegateAccessList = data.rows;
  3451. } else {
  3452. this.$message.warning(data.msg)
  3453. }
  3454. }).catch((error) => {
  3455. this.$message.error(error)
  3456. })
  3457. },
  3458. handleSelectionChange(val) {
  3459. // 获得选中的 用户
  3460. this.selectionDelegateAccess2 = val;
  3461. },
  3462. handleTableClick(row, column, event, val) {
  3463. // 表格行点击选择
  3464. this.$refs[val].toggleRowSelection(row);
  3465. },
  3466. openDelegateAccess() {
  3467. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3468. if (rows && rows.length > 0) {
  3469. this.$nextTick(() => {
  3470. rows.forEach(item => {
  3471. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3472. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3473. })
  3474. })
  3475. }
  3476. },
  3477. closeDelegateAccess() {
  3478. this.selectionDelegateAccess2 = [];
  3479. },
  3480. confirmDelegateAccess() {
  3481. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3482. this.delegateAccessVisible = false;
  3483. },
  3484. searchDelegateAccess() {
  3485. let params = {
  3486. site: this.modalData.site,
  3487. proofingNo: this.modalData.proofingNo,
  3488. }
  3489. searchDelegateAccess(params).then(({data}) => {
  3490. if (data && data.code === 0) {
  3491. this.selectionDelegateAccess = data.rows.map(item => {
  3492. return {
  3493. delegateAccess: item.delegateAccess,
  3494. delegateAccessName: item.delegateAccessName,
  3495. }
  3496. })
  3497. } else {
  3498. this.$message.warning(data.msg)
  3499. }
  3500. }).catch((error) => {
  3501. this.$message.error(error)
  3502. })
  3503. },
  3504. // 同意提交
  3505. agreeSubmit() {
  3506. this.$confirm(`是否确认提交?`, '提示', {
  3507. confirmButtonText: '确定',
  3508. cancelButtonText: '取消',
  3509. type: 'warning'
  3510. }).then(() => {
  3511. this.modalData.nodeConclusion = 'Y'
  3512. this.submitData()
  3513. })
  3514. },
  3515. // 驳回提交
  3516. rejectSubmit() {
  3517. this.$confirm(`是否确认驳回?`, '提示', {
  3518. confirmButtonText: '确定',
  3519. cancelButtonText: '取消',
  3520. type: 'warning'
  3521. }).then(() => {
  3522. this.modalData.rejectOpinion = this.rejectOpinion
  3523. this.modalData.nodeConclusion = 'N'
  3524. this.submitData()
  3525. })
  3526. },
  3527. // 提交
  3528. submitData() {
  3529. if (this.columnFieldList1) {
  3530. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3531. let row = this.columnFieldList1[i]
  3532. if (!this.modalData[row.fieldId] && row.required === 'Y') {
  3533. this.$message.error(row.fieldName + '不能为空')
  3534. return
  3535. }
  3536. }
  3537. }
  3538. if (this.columnFieldList2) {
  3539. if (!this.delegateAccessName) {
  3540. this.$message.error('Delegate Access不能为空')
  3541. return;
  3542. }
  3543. }
  3544. let tempData = {
  3545. ...this.modalData,
  3546. userName: this.$store.state.user.name,
  3547. menuId: this.$route.meta.menuId,
  3548. }
  3549. submitChange(tempData).then(({data}) => {
  3550. if (data && data.code === 0) {
  3551. this.getDataList()
  3552. this.$message({message: '操作成功', type: 'success'})
  3553. this.rejectVisible = false
  3554. this.submitModalFlag = false
  3555. this.modalFlag = false
  3556. } else {
  3557. this.$alert(data.msg, '错误', {
  3558. confirmButtonText: '确定'
  3559. })
  3560. }
  3561. })
  3562. },
  3563. // 获取流程的配置权限
  3564. async getNodeAuthority(row) {
  3565. let tempData = {
  3566. site: row.site,
  3567. stepId: row.stepId,
  3568. menuId: this.$route.meta.menuId
  3569. }
  3570. await getNodeAuthority(tempData).then(({data}) => {
  3571. if (data && data.code === 0) {
  3572. this.columnFieldList1 = data.rows.plm_proofing_information
  3573. this.columnFieldList2 = data.rows.plm_proofing_delegate_access
  3574. }
  3575. })
  3576. },
  3577. handleQueryCustomer() {
  3578. let params = {
  3579. site: this.$store.state.user.site,
  3580. customerNo: this.modalData.customerNo
  3581. }
  3582. queryCustomer(params).then(({data}) => {
  3583. if (data && data.code === 0) {
  3584. if (data.rows && data.rows.length === 1) {
  3585. this.modalData.customerDesc = data.rows[0].customerDesc
  3586. } else {
  3587. this.modalData.customerDesc = ''
  3588. }
  3589. } else {
  3590. this.$message.warning(data.msg)
  3591. }
  3592. }).catch((error) => {
  3593. this.$message.error(error)
  3594. })
  3595. },
  3596. handleQueryProjectByCustomer() {
  3597. let params = {
  3598. site: this.$store.state.user.site,
  3599. customerId: this.modalData.customerNo,
  3600. projectId: this.modalData.projectId
  3601. }
  3602. queryProjectByCustomer(params).then(({data}) => {
  3603. if (data && data.code === 0) {
  3604. if (data.rows && data.rows.length === 1) {
  3605. this.modalData.projectName = data.rows[0].projectName
  3606. } else {
  3607. this.modalData.projectName = ''
  3608. }
  3609. } else {
  3610. this.$message.warning(data.msg)
  3611. }
  3612. }).catch((error) => {
  3613. this.$message.error(error)
  3614. })
  3615. },
  3616. // 查询审批信息
  3617. getApprovalList() {
  3618. let tempData = {
  3619. site: this.$store.state.user.site,
  3620. menuId: this.$route.meta.menuId,
  3621. documentNo: this.proofingCurrentRow.proofingNo,
  3622. }
  3623. getApprovalList(tempData).then(({data}) => {
  3624. if (data && data.code === 0) {
  3625. this.approvalList = data.rows
  3626. } else {
  3627. this.approvalList = []
  3628. }
  3629. })
  3630. },
  3631. handleRouter(row){
  3632. this.modalFlag = false
  3633. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  3634. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  3635. } else {
  3636. this.$router.push({name:`part-partInformation`,params:{partNo:row.testPartNo},})
  3637. }
  3638. },
  3639. clearModalData(filed){
  3640. this.modalData[filed] = ''
  3641. },
  3642. handleSizeChange(val){
  3643. this.size = val
  3644. this.getProjectPartList();
  3645. },
  3646. handleCurrentChange(val){
  3647. this.no = val
  3648. this.getProjectPartList();
  3649. }
  3650. }
  3651. }
  3652. </script>
  3653. <style scoped lang="scss">
  3654. /deep/ .customer-tab .el-tabs__content {
  3655. padding: 0px !important;
  3656. height: 300px;
  3657. }
  3658. .right /deep/ .el-input__inner {
  3659. text-align: right;
  3660. }
  3661. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3662. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3663. -webkit-appearance: none;
  3664. }
  3665. /deep/ .inlineNumber input[type="number"] {
  3666. -moz-appearance: textfield;
  3667. padding-right: 5px !important;
  3668. }
  3669. </style>