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.

4103 lines
141 KiB

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