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.

3752 lines
130 KiB

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