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.

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