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.

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