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.

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