details.vue 92 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863
  1. <!-- 物料信息基础档案——详情 -->
  2. <template>
  3. <div class="material-details" v-loading="loading">
  4. <!-- 操作栏 -->
  5. <el-card>
  6. <!-- 基本信息栏 -->
  7. <div style="display: flex;justify-content: end;">
  8. <div v-if="activeMainTab == 'material'">
  9. <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
  10. <el-row
  11. v-if="updateButtonGroup || maintainNewVersion"
  12. :gutter="10"
  13. class="mb10"
  14. type="flex"
  15. justify="end"
  16. >
  17. <el-col :span="1.5">
  18. <el-button-group>
  19. <el-button size="small" @click="handleSave"
  20. v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
  21. 保存
  22. </el-button>
  23. </el-button-group>
  24. </el-col>
  25. <el-col :span="1.5">
  26. <el-button-group>
  27. <el-button size="small" @click="handleCancel">取消</el-button>
  28. </el-button-group>
  29. </el-col>
  30. </el-row>
  31. <el-row
  32. v-else
  33. :gutter="10"
  34. class="mb10"
  35. type="flex"
  36. justify="end"
  37. >
  38. <!-- 新增、修改、删除、复制 -->
  39. <el-col :span="1.5">
  40. <el-button-group>
  41. <!-- <el-button size="small" @click="handleInster">新增</el-button> -->
  42. <el-button size="small" @click="handleBasicEdit">修改</el-button>
  43. <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
  44. <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
  45. </el-button-group>
  46. </el-col>
  47. <!-- 查询、刷新、过滤 -->
  48. <el-col :span="1.5">
  49. <el-button-group>
  50. <el-button size="small" @click="handleRefresh">刷新</el-button>
  51. </el-button-group>
  52. </el-col>
  53. <!-- 启用 -->
  54. <el-col :span="1.5">
  55. <el-button-group>
  56. <el-button size="small" @click="handleMaterialType">维护物料类别</el-button>
  57. <el-button size="small" @click="handleIsInvoke" :key="count" v-hasPermi="['system:material:add']">
  58. <!-- 0:启用 2:停用 -->
  59. {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
  60. </el-button>
  61. </el-button-group>
  62. </el-col>
  63. <!-- 维护新版本 -->
  64. <el-col :span="1.5">
  65. <el-button-group>
  66. <el-button size="small" @click="handleNewVersion" v-hasPermi="['system:material:versions']">维护新版本
  67. </el-button>
  68. </el-button-group>
  69. </el-col>
  70. </el-row>
  71. </div>
  72. <!-- 其他标签页操作 修改、删除 -->
  73. <el-row
  74. :gutter="10"
  75. class="mb10"
  76. v-show="activeMainTab != 'material'"
  77. type="flex"
  78. justify="end"
  79. >
  80. <el-col :span="1.5">
  81. <el-button-group>
  82. <el-button size="small" @click="handleOtherEdit('table')">修改</el-button>
  83. <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
  84. </el-button-group>
  85. <el-button-group>
  86. <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
  87. </el-button-group>
  88. </el-col>
  89. </el-row>
  90. <!-- 返回 切换 附件管理 -->
  91. <el-row type="flex" justify="space-between">
  92. <el-col :span="6">
  93. <!-- :disabled="headerParam.isEdit" -->
  94. <el-button size="small" @click="handleBack" :disabled="updateButtonGroup">返回</el-button>
  95. </el-col>
  96. <el-col :span="6" style="text-align: right;">
  97. </el-col>
  98. </el-row>
  99. </div>
  100. <div class="md-content" :key="basicData.value.id">
  101. <el-form :inline="true" label-position="right" :model="basicData.value">
  102. <!-- <el-form-item label="所属组织"></el-form-item> -->
  103. <el-form-item label="物料编码">
  104. <el-input v-model="basicData.value.code" readonly size="mini"></el-input>
  105. </el-form-item>
  106. <el-form-item label="物料名称">
  107. <el-input v-model="basicData.value.name" readonly size="mini"></el-input>
  108. </el-form-item>
  109. <el-form-item label="英文名称">
  110. <el-input v-model="basicData.value.enName" readonly size="mini"></el-input>
  111. </el-form-item>
  112. <!-- <el-form-item label="版本号"></el-form-item> -->
  113. </el-form>
  114. <dr-tabs :tabList="detailsTabs" :handleTabClick="handleMainTabClick">
  115. <template #tabContent>
  116. <div class="md-basic" :key="count">
  117. <!-- 主信息 -->
  118. <div class="md-main">
  119. <!-- 基本信息展示表单 -->
  120. <el-form
  121. v-if="activeMainTab == 'material'"
  122. :inline="true"
  123. label-position="right"
  124. :model="basicData.value"
  125. ref="basicMessageRef"
  126. :rules="rules"
  127. >
  128. <el-row :gutter="10">
  129. <el-col :span="6" v-for="f in basicData.form" style="text-align: right;">
  130. <template v-if="f.show">
  131. <!-- 多选框 -->
  132. <el-form-item
  133. v-if="f.attribute == 'checkbox'"
  134. style="text-align: left;"
  135. :prop="f.prop"
  136. :key="f.required"
  137. >
  138. <el-checkbox
  139. :label="f.name" name="type"
  140. v-model="basicData.value[f.prop]"
  141. true-label="0"
  142. false-label="2"
  143. :disabled="handleJudge(f)"
  144. size="mini"
  145. >
  146. </el-checkbox>
  147. </el-form-item>
  148. <!-- 下拉框 -->
  149. <el-form-item v-else-if="f.attribute == 'select'"
  150. :id="(updateButtonGroup && f.apiUrl) ? 'selected' : ''"
  151. :prop="f.apiUrl ? `${f.prop}Name` : f.prop"
  152. :key="f.required"
  153. :rules="[{ required: f.required ,message: `请选择${f.name}`, trigger: 'change' }]"
  154. >
  155. <template slot="label">
  156. <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
  157. <!-- <span :class="(f.apiUrl && f.required) ? 'redSpan': ''">{{ f.name }}</span> -->
  158. <span>{{ f.name }}</span>
  159. <div slot="content">
  160. <p> {{ f.name }}</p>
  161. </div>
  162. </el-tooltip>
  163. </template>
  164. <!-- 参照 -->
  165. <el-select v-if="f.apiUrl"
  166. v-model="basicData.value[`${f.prop}Name`]"
  167. placeholder="请选择"
  168. size="mini"
  169. :key="basicData.value[f.prop]"
  170. :disabled="handleJudge(f)"
  171. @focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
  172. <div slot="empty"></div>
  173. </el-select>
  174. <!-- 字典 -->
  175. <el-select v-if="f.dictId"
  176. v-model="basicData.value[f.prop]"
  177. placeholder="请选择"
  178. size="mini"
  179. :key="basicData.value[f.prop]"
  180. :disabled="handleJudge(f)"
  181. >
  182. <el-option v-if="f.dictId"
  183. v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
  184. :value="d.dictValue">
  185. </el-option>
  186. </el-select>
  187. </el-form-item>
  188. <!-- 图片 -->
  189. <el-form-item v-else-if="f.attribute == 'image'" :label="f.name" @clicks="handleUpImage">
  190. <el-image :src="basicData.value[f.prop]" fit="contain"></el-image>
  191. <!-- <img :src="basicData.value[f.prop]" @clicks="handleUpImage" alt="加载失败"> -->
  192. </el-form-item>
  193. <!--attribute 文本 数字 文本域 为null -->
  194. <el-form-item v-else :prop="f.prop" :key="f.required">
  195. <template slot="label">
  196. <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
  197. <span>{{ f.name }}</span>
  198. <div slot="content">
  199. <p>{{ f.name }}</p>
  200. </div>
  201. </el-tooltip>
  202. </template>
  203. <el-input size="mini"
  204. v-model="basicData.value[f.prop]"
  205. :type="f.attribute || 'text'"
  206. :readonly="handleJudge(f)">
  207. </el-input>
  208. </el-form-item>
  209. </template>
  210. </el-col>
  211. </el-row>
  212. </el-form>
  213. <!-- 其他展示为列表 -->
  214. <el-table v-else
  215. border
  216. :data="mainMsg.value"
  217. @cell-dblclick="handleMaindbClick"
  218. @selection-change="handleMainChange"
  219. >
  220. <el-table-column type="selection" width="55"/>
  221. <el-table-column type="index" v-if="mainMsg.form.length" label="序号" width="55" align="center"/>
  222. <el-table-column
  223. v-for="m in mainMsg.form"
  224. v-if="m.show"
  225. :label="m.name"
  226. align="center"
  227. :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop"
  228. show-overflow-tooltip
  229. >
  230. <template slot-scope="scope">
  231. {{ m.attribute == 'select' ? scope.row[`${m.prop}Name`] :
  232. (m.attribute == 'checkbox' ?
  233. (scope.row[m.prop] == '0' ? '√' : '')
  234. : scope.row[m.prop])
  235. }}
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. <!-- 副信息 -->
  241. <div class="md-vice">
  242. <dr-tabs v-if="activeMainTab == 'material'" :tabList="basicMessage"
  243. :handleTabClick="handleViceTabClick">
  244. <template #tabContent>
  245. <el-form v-if="activeViceTab == 'material_medcine'"
  246. :inline="true"
  247. label-position="right"
  248. ref="medcineRef"
  249. :model="medcineData.value"
  250. class="md-vice-content"
  251. :rules="medcineRules"
  252. >
  253. <el-row :gutter="10">
  254. <el-col :span="6" v-for="m in medcineData.form" style="text-align: right;">
  255. <!-- 需要根据基本信息中的是否医药物料字段判断是否可以填写 -->
  256. <template v-if="m.show">
  257. <!-- 多选框 -->
  258. <el-form-item v-if="m.attribute == 'checkbox'" :prop="m.prop">
  259. <el-checkbox
  260. :label="m.name" name="type" v-model="medcineData.value[m.prop]" size="mini"
  261. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  262. true-label="0" false-label="2">
  263. </el-checkbox>
  264. </el-form-item>
  265. <!-- 下拉框 -->
  266. <el-form-item v-else-if="m.attribute == 'select'"
  267. :label="m.name"
  268. :prop="m.apiUrl ?`${m.prop}Name`: m.prop"
  269. :rules="[{ required: m.required ,message: `请选择${m.name}`, trigger: 'change' }]"
  270. >
  271. <!-- 参照弹窗 -->
  272. <el-select v-if="m.apiUrl"
  273. v-model="medcineData.value[`${m.prop}Name`]"
  274. placeholder="请选择"
  275. :key="medcineData.value[m.prop]" size="mini"
  276. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  277. @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
  278. <div slot="empty"></div>
  279. </el-select>
  280. <!-- 下拉选择 -->
  281. <el-select v-if="m.dictId"
  282. v-model="medcineData.value[m.prop]"
  283. placeholder="请选择"
  284. :key="medcineData.value[m.prop]"
  285. size="mini"
  286. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  287. @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
  288. <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
  289. :label="d.dictLabel" :value="d.dictValue">
  290. </el-option>
  291. </el-select>
  292. </el-form-item>
  293. <!-- 图片 -->
  294. <el-form-item v-else-if="m.attribute == 'image'" :label="m.name">
  295. <el-image :src="medcineData.value[m.prop]" fit="contain">
  296. </el-image>
  297. </el-form-item>
  298. <!-- 文本、数字、textarae -->
  299. <el-form-item v-else :label="m.name">
  300. <el-input size="mini"
  301. v-model="medcineData.value[m.prop]"
  302. :type="m.attribute || 'text'"
  303. :readonly="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')">
  304. </el-input>
  305. </el-form-item>
  306. </template>
  307. </el-col>
  308. </el-row>
  309. </el-form>
  310. <!-- 其他展示为列表 -->
  311. <!-- 辅计量 -->
  312. <el-table border v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
  313. class="material-table">
  314. <el-table-column type="index" v-if="unitDetails.form.length" label="序号" width="55"
  315. align="center"/>
  316. <el-table-column v-for="v in unitDetails.form" v-if="v.show" :label="v.name" align="center"
  317. :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
  318. <template slot-scope="scope">
  319. {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
  320. (v.attribute == 'checkbox' ?
  321. (scope.row[v.prop] == '0' ? '√' : '')
  322. : scope.row[v.prop])
  323. }}
  324. </template>
  325. </el-table-column>
  326. </el-table>
  327. <!-- 辅助属性 -->
  328. <el-table border v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
  329. class="material-table">
  330. <el-table-column type="index" v-if="propertyDetail.form.length" label="序号" width="55"
  331. align="center"/>
  332. <el-table-column v-for="v in propertyDetail.form" v-if="v.show" :label="v.name" align="center"
  333. :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
  334. <template slot-scope="scope">
  335. {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
  336. (v.attribute == 'checkbox' ?
  337. (scope.row[v.prop] == '0' ? '√' : '')
  338. : scope.row[v.prop])
  339. }}
  340. </template>
  341. </el-table-column>
  342. </el-table>
  343. </template>
  344. </dr-tabs>
  345. </div>
  346. <!-- 基本信息 - 审计信息 -->
  347. <div class="md-auditInfo" v-if="activeMainTab == 'material'">
  348. <el-divider content-position="left">审计信息</el-divider>
  349. <el-form :inline="true" label-position="right" :model="basicData.value">
  350. <el-form-item label="创建人">
  351. <el-input v-model="basicData.value.createByName" size="mini" readonly></el-input>
  352. </el-form-item>
  353. <el-form-item label="创建时间">
  354. <el-input v-model="basicData.value.createTime" size="mini" readonly></el-input>
  355. </el-form-item>
  356. <el-form-item label="最后修改人">
  357. <el-input v-model="basicData.value.updateByName" size="mini" readonly></el-input>
  358. </el-form-item>
  359. <el-form-item label="最后修改时间">
  360. <el-input v-model="basicData.value.updateTime" size="mini" readonly></el-input>
  361. </el-form-item>
  362. </el-form>
  363. </div>
  364. </div>
  365. </template>
  366. </dr-tabs>
  367. </div>
  368. </el-card>
  369. <!-- 维护物料类别弹窗 -->
  370. <el-dialog
  371. title="物料类别维护"
  372. :visible.sync="materialType.show"
  373. :before-close="handleCloseTypeDetails"
  374. :close-on-press-escape="false"
  375. :close-on-click-modal="false"
  376. width="80%"
  377. center
  378. class="materialType"
  379. >
  380. <!-- 操作按钮 -->
  381. <el-row
  382. :gutter="10"
  383. class="mb10"
  384. type="flex"
  385. justify="end"
  386. >
  387. <el-col :span="1.5">
  388. <el-button-group>
  389. <el-button size="small" :disabled="!materialType.isEdit" @click="handleMaterialTypeRow('add')">增行
  390. </el-button>
  391. <el-button size="small" :disabled="!materialType.isEdit" @click="handleMaterialTypeRow('del')">删行
  392. </el-button>
  393. </el-button-group>
  394. <el-button-group>
  395. <el-button size="small" @click="handleMaterialTypeRow('edit')" v-hasPermi="['system:material:add']">{{
  396. materialType.isEdit
  397. ? '保存' : '修改' }}
  398. </el-button>
  399. <el-button size="small" v-if="materialType.isEdit" @click="handleMaterialTypeRow('cancal')">取消</el-button>
  400. <el-button size="small" @click="handleMaterialTypeRow">刷新</el-button>
  401. </el-button-group>
  402. </el-col>
  403. </el-row>
  404. <!-- 表格数据 -->
  405. <el-table
  406. border
  407. :data="materialType.value"
  408. stripe
  409. style="width: 100%"
  410. max-height="350"
  411. v-loading="materialType.loading"
  412. :key="refer"
  413. @selection-change="handleSelectionType"
  414. >
  415. <el-table-column type="selection" width="30"/>
  416. <el-table-column type="index" width="50" label="序号"/>
  417. <el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
  418. <template slot-scope="scope">
  419. <!-- :prop="mt.prop" -->
  420. <!-- 多选框 -->
  421. <el-checkbox size="mini" v-if="mt.attribute == 'checkbox'" :disabled="!(materialType.isEdit && mt.edit)"
  422. true-label="0" false-label="2" v-model="scope.row[mt.prop]"/>
  423. <!-- 下拉框 / 参照弹窗---- 药品类别编码 scope.row[`${mt.prop}Name`] -->
  424. <el-select size="mini" v-else-if="mt.attribute == 'select' && mt.apiUrl" placeholder="请选择"
  425. :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]"
  426. :key="scope.row[mt.prop]"
  427. @focus="mt.apiUrl && handleQueryMore(mt, '', { name: 'materialType', prop: scope.row })">
  428. <div slot="empty"></div>
  429. </el-select>
  430. <!-- <el-select size="mini" v-else-if="mt.attribute == 'select' && mt.dictId" placeholder="请选择"
  431. :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]">
  432. <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
  433. :value="d.dictValue"></el-option></el-select> -->
  434. <!-- 其他类型 -->
  435. <el-input v-else size="mini" v-model="scope.row[mt.prop]" :readonly="!(materialType.isEdit && mt.edit)"/>
  436. </template>
  437. </el-table-column>
  438. </el-table>
  439. </el-dialog>
  440. <!-- 操作提示弹窗 -->
  441. <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center>
  442. <span>是否确认{{ optionDialog.op }}?</span>
  443. <span slot="footer">
  444. <el-button type="primary" @click="handleComfirmOption('cancal')">确 定</el-button>
  445. <el-button @click="handleOptionCancal">取 消</el-button>
  446. </span>
  447. </el-dialog>
  448. <!-- 其他页签的操作 -->
  449. <el-dialog
  450. :title="otherDeatils.title"
  451. :visible.sync="otherDeatils.show"
  452. show-close width="70%"
  453. :before-close="handleCloseOtherDetails"
  454. :close-on-press-escape="false"
  455. :close-on-click-modal="false"
  456. class="otherDialog"
  457. >
  458. <div v-loading="otherDeatils.loading">
  459. <!-- 其他标签页操作 修改、删除 -->
  460. <el-row
  461. :gutter="10"
  462. class="mb10"
  463. type="flex"
  464. justify="end"
  465. >
  466. <el-col :span="1.5" v-if="!otherDeatils.isEdit">
  467. <el-button-group>
  468. <el-button size="small" @click="handleOtherEdit('form')">修改</el-button>
  469. <!-- <el-button size="small" @click="handleOtherDel">删除</el-button> -->
  470. </el-button-group>
  471. <el-button-group>
  472. <el-button size="small" @click="handleOtherRefresh">刷新</el-button>
  473. </el-button-group>
  474. </el-col>
  475. <el-col :span="1.5" v-else>
  476. <el-button-group>
  477. <el-button size="small" @click="handleOtherSave">保存</el-button>
  478. <el-button size="small" @click="handleOtherCancel">取消</el-button>
  479. </el-button-group>
  480. </el-col>
  481. </el-row>
  482. <el-collapse v-model="collapseActive" @change="handleCollapseChange">
  483. <el-collapse-item title="物料基本信息" name="basic">
  484. <el-form :inline="true" label-position="right" :model="basicData.value">
  485. <el-form-item label="物料编码">
  486. <el-input v-model="basicData.value.code" size="small" readonly></el-input>
  487. </el-form-item>
  488. <el-form-item label="物料名称">
  489. <el-input v-model="basicData.value.name" size="small" readonly></el-input>
  490. </el-form-item>
  491. <el-form-item label="英文名称">
  492. <el-input v-model="basicData.value.enName" size="small" readonly></el-input>
  493. </el-form-item>
  494. </el-form>
  495. </el-collapse-item>
  496. <el-collapse-item :title="otherDeatils.title" :name="activeMainTab">
  497. <div class="od-msg">
  498. <!-- 展示表单 -->
  499. <el-form :inline="true" label-position="right" :key="refer" :hide-required-asterisk="true"
  500. :model="otherDeatils.value">
  501. <el-row :gutter="10">
  502. <el-col :span="8" v-for="f in otherDeatils.form" style="text-align: right;">
  503. <template v-if="f.show">
  504. <!-- 多选框 -->
  505. <el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;" class="od-msg-checkedbx">
  506. <el-checkbox :label="f.name" name="type" v-model="otherDeatils.value[f.prop]" true-label="0"
  507. false-label="2" :disabled="!(otherDeatils.isEdit && f.edit)">
  508. </el-checkbox>
  509. </el-form-item>
  510. <!-- 下拉框 - 弹窗参照 -->
  511. <el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
  512. <el-select v-if="f.apiUrl" v-model="otherDeatils.value[`${f.prop}Name`]" placeholder="请选择"
  513. :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
  514. @focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
  515. <div slot="empty"></div>
  516. </el-select>
  517. <!-- 字典-下拉 -->
  518. <el-select v-if="f.dictId" v-model="otherDeatils.value[f.prop]" placeholder="请选择"
  519. :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)">
  520. <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
  521. :value="d.dictValue">
  522. </el-option>
  523. </el-select>
  524. </el-form-item>
  525. <el-form-item v-else-if="f.attribute == 'image'" :label="f.name">
  526. <el-image :src="otherDeatils.value[f.prop]" fit="contain">
  527. </el-image>
  528. </el-form-item>
  529. <!--attribute 文本 数字 文本域 为null -->
  530. <el-form-item v-else :label="f.name">
  531. <el-input size="small" v-model="otherDeatils.value[f.prop]" :type="f.attribute || 'text'"
  532. :readonly="!(otherDeatils.isEdit && f.edit)">
  533. </el-input>
  534. </el-form-item>
  535. </template>
  536. </el-col>
  537. </el-row>
  538. </el-form>
  539. </div>
  540. </el-collapse-item>
  541. <el-collapse-item title="审计信息" name="auditInfo">
  542. <!-- 基本信息 - 审计信息 -->
  543. <div class="md-auditInfo">
  544. <el-form :inline="true" label-position="right" :model="basicData.value">
  545. <el-form-item label="创建人">
  546. <el-input v-model="basicData.value.createByName" size="small" readonly></el-input>
  547. </el-form-item>
  548. <el-form-item label="创建时间">
  549. <el-input v-model="basicData.value.createTime" size="small" readonly></el-input>
  550. </el-form-item>
  551. <el-form-item label="最后修改人">
  552. <el-input v-model="basicData.value.updateByName" size="small" readonly></el-input>
  553. </el-form-item>
  554. <el-form-item label="最后修改时间">
  555. <el-input v-model="basicData.value.updateTime" size="small" readonly></el-input>
  556. </el-form-item>
  557. </el-form>
  558. </div>
  559. </el-collapse-item>
  560. </el-collapse>
  561. </div>
  562. </el-dialog>
  563. <!-- 参照弹窗 -->
  564. <el-dialog
  565. :title="MoreDataDialog.msg.name"
  566. :visible.sync="MoreDataDialog.show"
  567. width="70%"
  568. class="MoreDataDialog"
  569. :close-on-press-escape="false"
  570. :close-on-click-modal="false"
  571. :before-close="handleCloseRefer"
  572. >
  573. <div>
  574. <el-row>
  575. <el-col :span="1.5">
  576. <el-input v-model="MoreDataDialog.key" placeholder="过滤" size="mini" @change="handleFilterRefer"/>
  577. </el-col>
  578. </el-row>
  579. <!-- 树形 -->
  580. <el-tree
  581. class="referTree"
  582. v-loading="MoreDataDialog.loading"
  583. v-if="MoreDataDialog.type == 'tree'"
  584. :data="MoreDataDialog.list"
  585. @node-click="handleNodeClick"
  586. :key="refer"
  587. :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps"
  588. node-key="id"
  589. >
  590. </el-tree>
  591. <!-- queryMedcineItemDrug -->
  592. <!-- 列表 -->
  593. <div v-else>
  594. <el-table
  595. border
  596. :data="MoreDataDialog.list"
  597. v-loading="MoreDataDialog.loading"
  598. style="width: 100%"
  599. @row-click="handleCurentRow"
  600. @row-dblclick="handleDbClick"
  601. highlight-current-row
  602. >
  603. <el-table-column type="index" label="序号" width="55" align="center"/>
  604. <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name"/>
  605. </el-table>
  606. <el-pagination
  607. @size-change="handleSizeChange"
  608. @current-change="handleCurrentChange"
  609. :current-page="queryParams.pageNum"
  610. :page-sizes="[10, 20, 50, 100]"
  611. layout="total, sizes, prev, pager, next, jumper"
  612. :total="queryParams.total"
  613. >
  614. </el-pagination>
  615. </div>
  616. <!-- 按钮 -->
  617. <el-row class="more-button">
  618. <el-button round size="small" type="primary" @click="handleConfirmRefer">确认</el-button>
  619. <el-button round size="small" @click="handleConcalRefer">取消</el-button>
  620. </el-row>
  621. </div>
  622. </el-dialog>
  623. </div>
  624. </template>
  625. <script>
  626. import drTabs from '../components/dr-tabs.vue';
  627. import detailsTabs from '../config/detailsTabs';
  628. import materialApi from '@/api/material/basic';
  629. import {getDicts as getDicts} from '@/api/system/dict/data'
  630. import arrayUtils from '../tools/arrayUtils';
  631. import { initRules, initParams} from './init/index';
  632. import { getDetail } from '@/api/classify/basic';
  633. export default {
  634. name: 'material-details',
  635. // dicts: [],
  636. components: {
  637. drTabs
  638. },
  639. data() {
  640. return {
  641. count: 1,
  642. refer: 1,
  643. loading: false,
  644. rules:{},
  645. medcineRules:{},
  646. // 维护新版本
  647. maintainNewVersion: false,
  648. // 详情固定标签页
  649. detailsTabs,
  650. defaultProps: {
  651. children: 'childrens',
  652. label: 'name'
  653. },
  654. drugProps: {
  655. children: 'childrens',
  656. label: function (data, node) {
  657. return data.code + ' ' + data.name
  658. }
  659. // 'name'
  660. },
  661. // 标签页当前激活状态
  662. activeMainTab: 'material',
  663. activeViceTab: 'material_medcine',
  664. materialId: this.$route.params.id,
  665. collapseActive: ['basic', '',],
  666. // 修改按钮 是否激活
  667. updateButtonGroup: false,
  668. // 基本信息下的页签
  669. basicMessage: [
  670. {
  671. label: '医药行业',
  672. code: 'material_medcine',
  673. isShow: true,
  674. },
  675. {
  676. label: '辅计量管理',
  677. code: 'material_unit',
  678. isShow: true,
  679. },
  680. {
  681. label: '辅助属性',
  682. code: 'material_property',
  683. isShow: true,
  684. },
  685. ],
  686. // 基本信息
  687. basicData: {
  688. value: {},
  689. form: []
  690. },
  691. // 物料类别
  692. materialType: {
  693. show: false,
  694. value: [],
  695. form: [],
  696. loading: false,
  697. checkedList: [],
  698. isEdit: false,
  699. },
  700. // 医药行业
  701. medcineData: {
  702. value: {},
  703. form: []
  704. },
  705. // 辅助属性
  706. propertyDetail: {
  707. value: [],
  708. form: []
  709. },
  710. // 辅计量管理
  711. unitDetails: {
  712. value: [],
  713. form: []
  714. },
  715. // 主标签信息
  716. mainMsg: {
  717. form: [],
  718. value: [],
  719. checkedList: [],
  720. },
  721. // 副信息
  722. viceMsg: {
  723. form: [],
  724. value: [],
  725. },
  726. // 操作弹窗
  727. optionDialog: {
  728. show: false,
  729. op: ''
  730. },
  731. // 其他页签操作弹窗
  732. otherDeatils: {
  733. loading: false,
  734. show: false,
  735. title: '',
  736. // 查询关键字-物料id
  737. queryKey: '',
  738. isEdit: false,
  739. // 详情表头
  740. from: [],
  741. // 详情值
  742. value: {}
  743. },
  744. // 编辑-更多数据展示弹窗_ 参照
  745. MoreDataDialog: {
  746. loading: false,
  747. show: false,
  748. // 查询关键字
  749. key: '',
  750. // 需要查看参照的表单头信息
  751. msg: '',
  752. type: 'table',
  753. // 查询出的参照数据
  754. list: [],
  755. // 查询出的参照表头
  756. form: [],
  757. // 选中的参照数据
  758. value: '',
  759. // 参照最后应该赋值的地方
  760. target: {
  761. name: '',
  762. prop: ''
  763. }
  764. },
  765. // 参照分页参数
  766. queryParams: {
  767. pageNum: 1,
  768. total: 0,
  769. pageSize: 10,
  770. },
  771. }
  772. },
  773. methods: {
  774. // 判断效期管理
  775. handleJudge(attribute) {
  776. // 维护新版本才能修改:批号及库存状态管理(isInventoryStatus)、
  777. if (attribute.prop == 'isInventoryStatus') {
  778. return !(this.maintainNewVersion && attribute.edit);
  779. }
  780. // 序列号管理(serialNoManager):维护新版本 && 批号及库存状态管理
  781. else if (attribute.prop == 'serialNoManager') {
  782. if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['serialNoManager'] = '2';
  783. return !(this.maintainNewVersion && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
  784. }
  785. // 批号及库存状态管理(isInventoryStatus) 控制 效期管理是否展示(expiryDateManagerment)
  786. else if (attribute.prop == 'expiryDateManagerment') {
  787. if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['expiryDateManagerment'] = '2';
  788. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
  789. }
  790. // 效期管理(expiryDateManagerment):控制一下几个是否可编辑
  791. // expiryUnitId 效期单位 usefulLife 有效期 usefulLifeUnitId 有效期至单位
  792. else if (attribute.prop == 'expiryUnitId'
  793. || attribute.prop == 'usefulLife'
  794. || attribute.prop == 'usefulLifeUnitId'
  795. || attribute.prop == 'recentWarningPeriod'
  796. ) {
  797. if (this.basicData.value['expiryDateManagerment'] == '2') {
  798. this.basicData.value['expiryUnitId'] = '';
  799. this.basicData.value['usefulLife'] = '';
  800. this.basicData.value['usefulLifeUnitId'] = '';
  801. this.basicData.value['recentWarningPeriod'] = '';
  802. }
  803. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['expiryDateManagerment'] == '0');
  804. }
  805. // 默认采购组织:purchasingOrganization 业务部门:businessDepartment
  806. else if (attribute.prop == 'businessDepartment') {
  807. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['purchasingOrganization']);
  808. } else {
  809. // 其他属性是否可编辑
  810. return !(this.updateButtonGroup && attribute.edit);
  811. }
  812. },
  813. // 返回
  814. handleBack() {
  815. this.$store.dispatch('tagsView/delView', this.$route)
  816. this.$router.go(-1)
  817. // this.$router.push({
  818. // path: `/basic/material/basicFile`,
  819. // });
  820. },
  821. // 附件按钮
  822. handleFile() {
  823. console.log('附件按钮');
  824. },
  825. // 改变分页情况
  826. handleChangePage(type) {
  827. switch (type) {
  828. case 'first':
  829. console.log('第一页');
  830. break;
  831. case 'pre':
  832. console.log('上一页');
  833. break;
  834. case 'next':
  835. console.log('下一页');
  836. break;
  837. case 'end':
  838. console.log('最后页');
  839. break;
  840. }
  841. },
  842. // 切换主信息标签
  843. handleMainTabClick(e) {
  844. this.activeMainTab = detailsTabs[e.index].code;
  845. this.collapseActive.splice(1, 1, this.activeMainTab);
  846. console.log(this.collapseActive, 'this.collapseActive');
  847. this.handleOtherListRefresh();
  848. },
  849. // 切换副表信息
  850. handleViceTabClick(e) {
  851. console.log(this.basicMessage[e.index], '切换标签');
  852. this.activeViceTab = this.basicMessage[e.index].code;
  853. switch (this.activeViceTab) {
  854. // 医药行业
  855. case 'material_medcine':
  856. this.getTagList('material_medcine', (form) => {
  857. this.medcineData.form = form;
  858. this.getMedcineDetails(this.materialId, 'material_medcine');
  859. })
  860. break;
  861. // 辅计量管理
  862. case 'material_unit':
  863. this.getTagList('material_unit', (form) => {
  864. console.log(form, 'form');
  865. this.unitDetails.form = form;
  866. this.getUnitList(this.materialId);
  867. });
  868. break;
  869. // 辅助属性
  870. case 'material_property':
  871. this.getTagList('material_property', (form) => {
  872. this.propertyDetail.form = form;
  873. this.getPropertyList(this.materialId);
  874. });
  875. break;
  876. default:
  877. break;
  878. }
  879. },
  880. // 主标签页 列表双击
  881. handleMaindbClick(e) {
  882. this.otherDeatils.queryKey = e.id;
  883. this.otherDeatils.show = true;
  884. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  885. console.log(activeTab, 'activeTab');
  886. this.otherDeatils.title = activeTab.label;
  887. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  888. },
  889. // 主页签 列表数据选择
  890. handleMainChange(e) {
  891. this.mainMsg.checkedList = e;
  892. },
  893. // 上传图片
  894. handleUpImage() {
  895. },
  896. // 编辑状态下,参照弹窗显示查询数据
  897. handleQueryMore(msg, val, target) {
  898. this.MoreDataDialog.loading = true;
  899. let _this = this;
  900. console.log('编辑状态下,弹窗显示查询数据', msg, 'val', val, target);
  901. this.MoreDataDialog.show = true;
  902. this.MoreDataDialog.msg = msg;
  903. this.MoreDataDialog.target = target;
  904. let par = {param: this.MoreDataDialog.key};
  905. this[target.name].form.map(t => {
  906. if (t.relevance && t.relevance != '') {
  907. let reList = t.relevance.split(',');
  908. console.log(reList, 'reList-------------------');
  909. reList.forEach(i => {
  910. par[i] = this.basicData.value[i]
  911. })
  912. console.log(par, 'par/////////////////////////');
  913. }
  914. })
  915. this.getExecuteMethods(msg.apiUrl, par, (data) => {
  916. console.log(data, '编辑状态下,弹窗显示查询数据');
  917. _this.MoreDataDialog.type = data.type;
  918. if (data.type == 'tree') {
  919. _this.MoreDataDialog.list = arrayUtils.filterTreeData(data.tableBody);
  920. } else {
  921. _this.MoreDataDialog.list = data.tableBody;
  922. _this.MoreDataDialog.form = data.tableHeader;
  923. }
  924. this.refer++;
  925. // this.count++;s
  926. console.log(_this.MoreDataDialog.list, 'this.MoreDataDialog.list');
  927. console.log(_this.MoreDataDialog.form, 'this.MoreDataDialog.form');
  928. })
  929. },
  930. // 参照改变分页大小
  931. handleSizeChange(e) {
  932. this.queryParams.pageSize = e;
  933. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  934. },
  935. // 参照改变当前页
  936. handleCurrentChange(e) {
  937. this.queryParams.pageNum = e;
  938. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  939. },
  940. // 根据apiUrl获取对应参照的值
  941. getExecuteMethods(methodName, param, cb) {
  942. let page = {
  943. pageSize: this.queryParams.pageSize,
  944. pageNum: this.queryParams.pageNum,
  945. }
  946. let params = {...param};
  947. // 业务部门需要 依据默认采购组组织查询
  948. if (methodName == "queryOperatingDepptTree") {
  949. params['puOrgId'] = this.basicData.value['purchasingOrganization']
  950. }
  951. materialApi.executeMethods(methodName, params, page).then(res => {
  952. this.MoreDataDialog.loading = false;
  953. if (res.code == 200) {
  954. this.queryParams.total = res.data.total;
  955. cb(res.data);
  956. }
  957. })
  958. },
  959. // 获取物料基本信息详细信息
  960. async getMaterialDetails(id, templateCode) {
  961. let _this = this;
  962. await materialApi.materialDetails(
  963. id,
  964. templateCode,
  965. ).then(res => {
  966. this.loading = false;
  967. console.log(res, '物料基本信息');
  968. let {code, data} = res;
  969. if (code == 200) {
  970. _this.basicData.value ={... _this.basicData.value,...data.data};
  971. for (const key in data.data) {
  972. _this.basicData.value[key] = (typeof data.data[key] === 'number') ? String(data.data[key]) : data.data[key];
  973. }
  974. // _this.handleAddReferLabel('basicData');
  975. }
  976. })
  977. },
  978. // 添加参照中的label
  979. // handleAddReferLabel(dataName) {
  980. // let _this = this;
  981. // this[dataName].form.map(item => {
  982. // // 查参照
  983. // if (item.apiUrl && item.apiUrl != '') {
  984. // let param = {};
  985. // if (item.relevance && item.relevance != '') {
  986. // let reList = item.relevance.split(',');
  987. // console.log(reList, 'reList-------------------');
  988. // reList.forEach(i => {
  989. // param[i] = this.basicData.value[i]
  990. // })
  991. // console.log(param, 'param/////////////////////////');
  992. // }
  993. // _this.getExecuteMethods(item.apiUrl, param, (data) => {
  994. // let { tableBody } = data;
  995. // // 维护物料类别 --- 属于列表中获取label
  996. // if (dataName == 'materialType') {
  997. // _this[dataName].value.length && (_this[dataName].value = _this[dataName].value.map(d => {
  998. // let Blabel = tableBody.filter((t) => t.id == d[item.prop])[0];
  999. // console.log(Blabel, 'Blabel``````````````````````````');
  1000. // d[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
  1001. // return d;
  1002. // }))
  1003. // } else {
  1004. // let Blabel = tableBody.filter((t) => t.id == _this[dataName].value[item.prop])[0];
  1005. // console.log(Blabel, 'Blabel``````````````````````````');
  1006. // _this[dataName].value[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
  1007. // }
  1008. // // this.count++;
  1009. // this.loading = false;
  1010. // console.log(_this[dataName].value, `${dataName}//////////////////////`);
  1011. // })
  1012. // }
  1013. // })
  1014. // this.materialType.loading = false;
  1015. // },
  1016. // 查询财务信息列表
  1017. async getFinanceList(materialId) {
  1018. try {
  1019. this.loading = true;
  1020. let {code,data} = await materialApi.financeList({materialId});
  1021. if (code == 200) {
  1022. this.mainMsg.value = data.tableBody.rows;
  1023. }
  1024. } catch (error) {
  1025. }finally{
  1026. this.loading = false;
  1027. }
  1028. },
  1029. // 查询计划信息列表
  1030. async getPlanList(materialId) {
  1031. try {
  1032. this.loading = true;
  1033. let {code,data} = await materialApi.planList({materialId});
  1034. if (code == 200) {
  1035. this.mainMsg.value = data.tableBody.rows;
  1036. }
  1037. } catch (error) {
  1038. }finally{
  1039. this.loading = false;
  1040. }
  1041. },
  1042. // 查询成本信息列表
  1043. async getCostList(materialId) {
  1044. try {
  1045. this.loading = true;
  1046. let {code,data} = await materialApi.costList({materialId});
  1047. if (code == 200) {
  1048. this.mainMsg.value = data.tableBody.rows;
  1049. }
  1050. } catch (error) {
  1051. }finally{
  1052. this.loading = false;
  1053. }
  1054. },
  1055. // 查询利润中心列表
  1056. async getCenterList(materialId) {
  1057. try {
  1058. this.loading = true;
  1059. let {code,data} = await materialApi.centerList({materialId});
  1060. if (code == 200) {
  1061. this.mainMsg.value = data.tableBody.rows;
  1062. }
  1063. } catch (error) {
  1064. }finally{
  1065. this.loading = false;
  1066. }
  1067. },
  1068. // 查询采购中心列表
  1069. async getPurchaseList(materialId) {
  1070. try {
  1071. this.loading = true;
  1072. let {code,data} = await materialApi.purchaseList({materialId});
  1073. if (code == 200) {
  1074. this.mainMsg.value = data.tableBody.rows;
  1075. }
  1076. } catch (error) {
  1077. }finally{
  1078. this.loading = false;
  1079. }
  1080. },
  1081. // 获取库存信息列表
  1082. async getInventoryList(materialId) {
  1083. try {
  1084. this.loading = true;
  1085. let {code,data} = await materialApi.inventoryList({materialId});
  1086. if (code == 200) {
  1087. this.mainMsg.value = data.tableBody.rows;
  1088. }
  1089. } catch (error) {}finally{
  1090. this.loading = false;
  1091. }
  1092. },
  1093. // 查询其他标签页列表详情
  1094. getOtherListDetails(type, id) {
  1095. console.log(type, id, '查询其他标签页列表详情');
  1096. this.otherDeatils.form = this.mainMsg.form;
  1097. console.log(this.otherDeatils.form, 'this.otherDeatils.form');
  1098. switch (type) {
  1099. // 财物信息
  1100. case 'material_finance':
  1101. this.getFinanceDetails(id);
  1102. break;
  1103. // 利润中心信息
  1104. case 'profit_center':
  1105. this.getCenterDetails(id);
  1106. break;
  1107. // 采购信息
  1108. case 'material_purchase':
  1109. this.getPurchaseDetails(id);
  1110. break;
  1111. // 库存信息
  1112. case 'material_inventory':
  1113. this.getInventoryDetails(id);
  1114. break;
  1115. // 计划信息
  1116. case 'material_plan':
  1117. this.getPlanDetails(id);
  1118. break;
  1119. // 成本信息
  1120. case 'material_cost':
  1121. this.getCostDetails(id);
  1122. break;
  1123. default:
  1124. break;
  1125. }
  1126. },
  1127. // 查询财务信息详情
  1128. async getFinanceDetails(id) {
  1129. try {
  1130. this.otherDeatils.loading = true;
  1131. let {code,data} = await materialApi.financeDetails(id);
  1132. if (code == 200) {
  1133. this.otherDeatils.value = data.data;
  1134. }
  1135. } catch (error) {}
  1136. finally{
  1137. setTimeout(()=>{
  1138. this.otherDeatils.loading = false;
  1139. },200)
  1140. }
  1141. },
  1142. // 获取利润中心详情
  1143. async getCenterDetails(id) {
  1144. try {
  1145. this.otherDeatils.loading = true;
  1146. let {code,data} = await materialApi.centerDetails(id);
  1147. if (code == 200) {
  1148. this.otherDeatils.value = data.data;
  1149. }
  1150. } catch (error) {}
  1151. finally{
  1152. setTimeout(()=>{
  1153. this.otherDeatils.loading = false;
  1154. },200)
  1155. }
  1156. },
  1157. // 获取采购详细信息详情
  1158. async getPurchaseDetails(id) {
  1159. try {
  1160. this.otherDeatils.loading = true;
  1161. let {code,data} = await materialApi.purchaseDetails(id);
  1162. if (code == 200) {
  1163. this.otherDeatils.value = data.data;
  1164. }
  1165. } catch (error) {}
  1166. finally{
  1167. setTimeout(()=>{
  1168. this.otherDeatils.loading = false;
  1169. },200)
  1170. }
  1171. },
  1172. // 获取成本信息详情
  1173. async getCostDetails(id) {
  1174. try {
  1175. this.otherDeatils.loading = true;
  1176. let {code,data} = await materialApi.costDetails(id);
  1177. if (code == 200) {
  1178. this.otherDeatils.value = data.data;
  1179. }
  1180. } catch (error) {}
  1181. finally{
  1182. setTimeout(()=>{
  1183. this.otherDeatils.loading = false;
  1184. },200)
  1185. }
  1186. },
  1187. // 获取计划信息详情
  1188. async getPlanDetails(id) {
  1189. try {
  1190. this.otherDeatils.loading = true;
  1191. let {code,data} = await materialApi.planDetails(id);
  1192. if (code == 200) {
  1193. this.otherDeatils.value = data.data;
  1194. }
  1195. } catch (error) {}
  1196. finally{
  1197. setTimeout(()=>{
  1198. this.otherDeatils.loading = false;
  1199. },200)
  1200. }
  1201. },
  1202. //
  1203. async getInventoryDetails(id) {
  1204. try {
  1205. this.otherDeatils.loading = true;
  1206. let {code,data} = await materialApi.inventoryDetails(id);
  1207. if (code == 200) {
  1208. this.otherDeatils.value = data.data;
  1209. }
  1210. } catch (error) {}
  1211. finally{
  1212. setTimeout(()=>{
  1213. this.otherDeatils.loading = false;
  1214. },200)
  1215. }
  1216. },
  1217. /* 二级标签页 */
  1218. // 根据物料id获取医药行业信息详细信息
  1219. async getMedcineDetails(id) {
  1220. let _this = this;
  1221. console.log(id);
  1222. materialApi.medcineDetailsInfo(id).then((res) => {
  1223. this.loading = false;
  1224. console.log(res, '医药行业');
  1225. let {code, data} = res;
  1226. if (code == 200) {
  1227. _this.medcineData.value = data.data || {};
  1228. // this.medcineData.form = data.form;
  1229. // _this.handleAddReferLabel('medcineData');
  1230. console.log(' _this.medcineData', _this.medcineData, res);
  1231. }
  1232. })
  1233. },
  1234. // 获取物料辅助属性详细信息+表单列段属性
  1235. getPropertyDetails(id) {
  1236. materialApi.propertyDetails(id).then(res => {
  1237. console.log(res, '物料辅助属性详细信息');
  1238. if (res.code == 200) {
  1239. this.propertyDetail.value = res.data.data || [];
  1240. }
  1241. })
  1242. },
  1243. // 查询物料辅助属性列表+表头字段
  1244. getPropertyList(materialId) {
  1245. materialApi.propertyList({materialId}).then(res => {
  1246. console.log(res, '料辅助属性列表');
  1247. if (res.code == 200) {
  1248. this.propertyDetail.value = res.data.data || [];
  1249. }
  1250. })
  1251. },
  1252. //获取辅助计量单位基本信息+表单列段属性
  1253. getUnitDetails(materialId) {
  1254. materialApi.unitDetails(materialId).then(res => {
  1255. console.log(res, '辅助计量单位基本信息');
  1256. if (res.code == 200) {
  1257. this.unitDetails.value = res.data.tableBody.rows || [];
  1258. }
  1259. })
  1260. },
  1261. //获取辅计量管理列表信息
  1262. getUnitList(materialId) {
  1263. materialApi.unitList({materialId}).then(res => {
  1264. console.log(res, '辅计量管理列表信息');
  1265. if (res.code == 200) {
  1266. this.unitDetails.value = res.data.tableBody.rows || [];
  1267. }
  1268. })
  1269. },
  1270. // 获取物料列表表头
  1271. getTagList(templateCode, cb) {
  1272. let _this = this
  1273. materialApi.tagList({templateCode}).then(res => {
  1274. console.log(res, `获取${templateCode}表头`);
  1275. let dictIdList = [];
  1276. if (res.code == 200) {
  1277. res.data.map(item => {
  1278. // 查字典
  1279. if (item.dictId && item.dictId != '') {
  1280. // 通过接口获取有dict的对应的数据
  1281. getDicts(item.dictId).then(dict => {
  1282. if (dict.data) {
  1283. item['dictValue'] = dict.data;
  1284. }
  1285. })
  1286. }
  1287. })
  1288. // 动态更改dict
  1289. // res.data.forEach(item => {
  1290. // if (item.dictId) {
  1291. // // 请求接口
  1292. // dictIdList.push(item.dictId);
  1293. // }
  1294. // })
  1295. // console.log(dictIdList, 'dictIdList');
  1296. // _this.dict = [..._this.dict, ...dictIdList];
  1297. // _this.dict = Array.from(new Set([..._this.dict, ...dictIdList]));
  1298. // console.log(_this.dict, 'dicts');
  1299. return cb(res.data);
  1300. }
  1301. })
  1302. },
  1303. // 根据物料id获取物料类别维护列表
  1304. getMedcineitemList(materialId) {
  1305. let _this = this;
  1306. materialApi.medcineitemList({materialId}).then(res => {
  1307. this.materialType.loading = false;
  1308. console.log(res, '根据物料id获取物料类别维护列表');
  1309. if (res.code == 200) {
  1310. _this.materialType.value = res.data.tableBody.rows;
  1311. // _this.handleAddReferLabel('materialType');
  1312. }
  1313. })
  1314. },
  1315. // 新增
  1316. handleInster() {
  1317. this.$notify({
  1318. title: '警告',
  1319. message: '物料只能通过申请审批增加,不能在节点直接录入!',
  1320. type: 'warning'
  1321. });
  1322. },
  1323. // 除基本信息之后的修改
  1324. handleOtherEdit(type) {
  1325. // debugger
  1326. console.log('除基本信息之后的修改', type);
  1327. if ('table' === type) {
  1328. if (this.mainMsg.checkedList.length == 1) {
  1329. this.otherDeatils.show = true;
  1330. this.otherDeatils.isEdit = true;
  1331. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  1332. this.otherDeatils.title = activeTab.label;
  1333. this.otherDeatils.queryKey = this.mainMsg.checkedList[0].id;
  1334. console.log(this.otherDeatils, 'this.otherDeatils');
  1335. // 查询其他标签页列表详情
  1336. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  1337. } else {
  1338. this.$notify({
  1339. title: '警告',
  1340. message: '修改请选择单个数据!',
  1341. type: 'warning'
  1342. });
  1343. }
  1344. } else if ('form' === type) {
  1345. if (this.otherDeatils.queryKey) {
  1346. this.otherDeatils.show = true;
  1347. this.otherDeatils.isEdit = true;
  1348. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  1349. this.otherDeatils.title = activeTab.label;
  1350. // 查询其他标签页列表详情
  1351. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  1352. }
  1353. }
  1354. },
  1355. // 其他标签详情弹窗-刷新
  1356. handleOtherRefresh() {
  1357. this.getOtherListDetails(this.activeMainTab, this.otherDeatils.queryKey);
  1358. },
  1359. // 其他标签详情弹窗-删除
  1360. handleOtherDel() {
  1361. let ids = this.mainMsg.checkedList.map(i => i.id);
  1362. console.log(`${this.activeMainTab}其他标签详情弹窗-删除---id合集`, ids);
  1363. if (ids.length) {
  1364. switch (this.activeMainTab) {
  1365. // 财物信息
  1366. case 'material_finance':
  1367. this.handleDelFinance(ids);
  1368. break;
  1369. // 利润中心信息
  1370. case 'profit_center':
  1371. this.handledDelCenter(ids);
  1372. break;
  1373. // 采购信息
  1374. case 'material_purchase':
  1375. this.handledelPurchase(ids);
  1376. break;
  1377. // 库存信息
  1378. case 'material_inventory':
  1379. this.handleDelInventory(ids);
  1380. break;
  1381. // 计划信息
  1382. case 'material_plan':
  1383. this.handleDelPlan(ids);
  1384. break;
  1385. // 成本信息
  1386. case 'material_cost':
  1387. this.handleDelCost(ids);
  1388. default:
  1389. break;
  1390. }
  1391. } else {
  1392. this.$notify({
  1393. title: '警告',
  1394. message: '请选择需要删除的数据!',
  1395. type: 'warning'
  1396. });
  1397. }
  1398. },
  1399. // 其他标签页刷新
  1400. async handleOtherListRefresh() {
  1401. switch (this.activeMainTab) {
  1402. // 基本信息
  1403. case 'material':
  1404. await this.getTagList('material', async(form) => {
  1405. this.basicData.form = [...form];
  1406. await this.getMaterialDetails(this.materialId, 'material');
  1407. })
  1408. break;
  1409. // 财物信息
  1410. case 'material_finance':
  1411. await this.getTagList('material_finance', async(form) => {
  1412. this.mainMsg.form = [...form];
  1413. await this.getFinanceList(this.materialId);
  1414. });
  1415. break;
  1416. // 利润中心信息
  1417. case 'profit_center':
  1418. await this.getTagList('profit_center', async(form) => {
  1419. this.mainMsg.form = [...form];
  1420. await this.getCenterList(this.materialId);
  1421. });
  1422. break;
  1423. // 采购信息
  1424. case 'material_purchase':
  1425. await this.getTagList('material_purchase', async(form) => {
  1426. this.mainMsg.form = [...form];
  1427. await this.getPurchaseList(this.materialId);
  1428. });
  1429. break;
  1430. // 库存信息
  1431. case 'material_inventory':
  1432. await this.getTagList('material_inventory', async(form) => {
  1433. this.mainMsg.form = [...form];
  1434. await this.getInventoryList(this.materialId);
  1435. });
  1436. break;
  1437. // 计划信息
  1438. case 'material_plan':
  1439. await this.getTagList('material_plan', async(form) => {
  1440. this.mainMsg.form = [...form];
  1441. await this.getPlanList(this.materialId);
  1442. });
  1443. break;
  1444. // 成本信息
  1445. case 'material_cost':
  1446. await this.getTagList('material_cost',async(form) => {
  1447. this.mainMsg.form = [...form];
  1448. await this.getCostList(this.materialId);
  1449. });
  1450. break;
  1451. default:
  1452. break;
  1453. }
  1454. },
  1455. // 修改
  1456. handleBasicEdit() {
  1457. console.log('修改基本信息');
  1458. this.updateButtonGroup = true;
  1459. // this.count++;
  1460. //需要禁止点击其他标签
  1461. // this.detailsTabs = this.detailsTabs.map(item => {
  1462. // item['disabled'] = true;
  1463. // return item
  1464. // })
  1465. console.log(this.detailsTabs, 'this.detailsTabs ');
  1466. },
  1467. // 删除
  1468. handleDel() {
  1469. console.log('删除----基本信息');
  1470. },
  1471. // 复制
  1472. handleCopy() {
  1473. console.log('复制');
  1474. },
  1475. //查询
  1476. handleQuery() {
  1477. },
  1478. // 刷新
  1479. handleRefresh() {
  1480. console.log('刷新');
  1481. this.$refs.basicMessageRef.clearValidate();
  1482. this.$refs.medcineRef.clearValidate();
  1483. this.handleRest();
  1484. },
  1485. // 过滤
  1486. handleFilter(e) {
  1487. console.log(e, '过滤');
  1488. },
  1489. filterCondition(type) {
  1490. return {
  1491. type
  1492. }
  1493. },
  1494. // 维护物料类别
  1495. handleMaterialType() {
  1496. console.log('维护物料类别');
  1497. this.materialType.show = true;
  1498. this.materialType.loading = true;
  1499. this.getTagList('material_medcine_item', (form) => {
  1500. this.materialType.form = form;
  1501. this.getMedcineitemList(this.materialId);
  1502. });
  1503. },
  1504. // 启用
  1505. handleIsInvoke(e) {
  1506. console.log('启用', this.basicData.value.isEnable);
  1507. let param = {
  1508. isEnable: this.basicData.value.isEnable == '已启用' ? '2' : '0',
  1509. id: this.basicData.value.id
  1510. };
  1511. console.log(param, '启用/停用param');
  1512. materialApi.updateEnableMaterial(param).then(res => {
  1513. console.log(res, '启用/停用');
  1514. if (res.code == 200) this.handleRefresh();
  1515. })
  1516. },
  1517. // 维护新版本
  1518. handleNewVersion() {
  1519. let _this = this;
  1520. let data = {
  1521. // 物料编码
  1522. code: this.basicData.value.code
  1523. }
  1524. materialApi.versions(data).then(res => {
  1525. console.log(res, '维护新版本');
  1526. if (res.code == 200) {
  1527. _this.maintainNewVersion = res.data.result;
  1528. // 维护版本消息展示 by shiy 2023/05/31
  1529. if (!res.data.result) {
  1530. this.$notify({
  1531. title: '警告',
  1532. message: res.data.msg,
  1533. type: 'warning'
  1534. });
  1535. }
  1536. }
  1537. })
  1538. },
  1539. // 维护物料保存
  1540. handleSaveNewVersion(cb) {
  1541. let data = {
  1542. // 物料编码
  1543. materialCode: this.basicData.value.code,
  1544. //序列号管理; 2= 否,0= 是
  1545. serialNoManager: this.basicData.value.serialNoManager,
  1546. // 批号及库存状态管理;2=否,0=是
  1547. isInventoryStatus: this.basicData.value.isInventoryStatus,
  1548. }
  1549. materialApi.saveVersions(data).then(res => {
  1550. console.log(res, '维护物料保存');
  1551. if (res.code == 200) {
  1552. cb();
  1553. }
  1554. })
  1555. .catch((error) => {
  1556. this.loading = false;
  1557. })
  1558. },
  1559. // 取消保存
  1560. handleCancel() {
  1561. console.log('取消保存');
  1562. this.optionDialog.op = '取消';
  1563. this.optionDialog.show = true;
  1564. },
  1565. // 保存修改
  1566. handleSave() {
  1567. console.log('保存修改');
  1568. this.$refs['basicMessageRef'].validate(async (valid) => {
  1569. if (valid) {
  1570. this.loading = true;
  1571. // 普通保存修改
  1572. this.updateButtonGroup && this.handleSaveMaterial(() => {
  1573. this.updateButtonGroup = false;
  1574. this.handleRefresh();
  1575. });
  1576. // 维护新版本保存修改
  1577. this.maintainNewVersion && this.handleSaveNewVersion(() => {
  1578. this.maintainNewVersion = false;
  1579. this.handleRefresh();
  1580. })
  1581. } else {
  1582. this.$notify.error({
  1583. title: '错误',
  1584. message: '存在必填项未填写!'
  1585. });
  1586. console.log('error submit!!');
  1587. return false;
  1588. }
  1589. })
  1590. },
  1591. // 物料类别列表选中
  1592. handleSelectionType(list) {
  1593. console.log('物料类别列表选中', list);
  1594. this.materialType.checkedList = list;
  1595. },
  1596. // 物料类别增删行
  1597. handleMaterialTypeRow(op) {
  1598. let _this = this;
  1599. switch (op) {
  1600. // 增行
  1601. case 'add':
  1602. let rowObj = {};
  1603. for (const key in _this.materialType.value[0]) {
  1604. if (Object.hasOwnProperty.call(_this.materialType.value[0], key)) {
  1605. rowObj[key] = '';
  1606. }
  1607. }
  1608. rowObj['insertId'] = new Date().getTime();
  1609. this.materialType.value.push(rowObj);
  1610. console.log(this.materialType.value, '物料类别增行rowObj后');
  1611. break;
  1612. // 删行
  1613. case 'del':
  1614. console.log('物料类别删行', _this.materialType.checkedList);
  1615. if (_this.materialType.checkedList.length) {
  1616. _this.materialType.checkedList.map(c => {
  1617. _this.materialType.value = _this.materialType.value.filter(m => {
  1618. if (m.id && m.id != '' && m.id != c.id) {
  1619. return m;
  1620. } else if (m.insertId && m.insertId != '' && m.insertId != c.insertId) {
  1621. return m
  1622. }
  1623. })
  1624. })
  1625. } else {
  1626. this.$notify({
  1627. title: '警告',
  1628. message: '请选择需要删除的信息!',
  1629. type: 'warning'
  1630. });
  1631. }
  1632. break;
  1633. // 取消
  1634. case 'cancal':
  1635. this.materialType.isEdit = false;
  1636. this.handleMaterialTypeRow();
  1637. break;
  1638. // 保存、修改
  1639. case 'edit':
  1640. if (_this.materialType.isEdit) {
  1641. // 编辑状态
  1642. let nullList = _this.materialType.value.filter(m => (!m.drugId || m.drugId == ''));
  1643. console.log(nullList, 'nullList');
  1644. if (!nullList.length && _this.materialType.value.length) {
  1645. console.log('物料类别保存', _this.materialType.value);
  1646. let params = {
  1647. materialId: _this.materialId,
  1648. medcineItems: _this.materialType.value
  1649. }
  1650. materialApi.medcineitemBatchSave(params).then(res => {
  1651. console.log(res, '保存物料类型');
  1652. if (res.code == 200) {
  1653. _this.materialType.isEdit = false;
  1654. _this.handleMaterialTypeRow();
  1655. }
  1656. })
  1657. // 保存
  1658. } else {
  1659. this.$notify({
  1660. title: '警告',
  1661. message: '不能保存空数据或存在数据为空!',
  1662. type: 'warning'
  1663. });
  1664. }
  1665. } else {
  1666. // 非编辑状态
  1667. console.log('物料类别修改');
  1668. this.materialType.isEdit = true;
  1669. }
  1670. break;
  1671. // 刷新
  1672. default:
  1673. console.log('物料类别刷新');
  1674. if (this.materialType.isEdit) {
  1675. this.$notify({
  1676. title: '警告',
  1677. message: '请先保存数据!',
  1678. type: 'warning'
  1679. });
  1680. } else {
  1681. this.materialType.loading = true;
  1682. this.getTagList('material_medcine_item', (form) => {
  1683. this.materialType.form = form;
  1684. this.getMedcineitemList(this.materialId);
  1685. });
  1686. }
  1687. break;
  1688. }
  1689. },
  1690. // 物料类别弹窗关闭前
  1691. handleCloseTypeDetails(done) {
  1692. console.log('物料类别弹窗关闭前');
  1693. this.materialType.isEdit ? this.$notify({
  1694. title: '警告',
  1695. message: '请先保存数据!',
  1696. type: 'warning'
  1697. }): done();
  1698. },
  1699. // 保存修改并新增
  1700. handleSaveAdd() {
  1701. console.log('保存修改并新增');
  1702. },
  1703. // 其他标签页弹窗取消操作
  1704. handleOtherCancel() {
  1705. console.log('其他标签页弹窗取消操作');
  1706. this.optionDialog.show = true;
  1707. this.optionDialog.op = '修改';
  1708. },
  1709. // 其他标签页弹窗保存
  1710. async handleOtherSave() {
  1711. console.log('其他标签页弹窗保存', this.activeMainTab);
  1712. let data = this.otherDeatils.value;
  1713. console.log(data, 'params');
  1714. switch (this.activeMainTab) {
  1715. // 财物信息
  1716. case 'material_finance':
  1717. await this.handleSaveFinance(data);
  1718. break;
  1719. // 利润中心信息
  1720. case 'profit_center':
  1721. await this.handleSaveCenter(data);
  1722. break;
  1723. // 采购信息
  1724. case 'material_purchase':
  1725. await this.handleSavePurchase(data);
  1726. break;
  1727. // 库存信息
  1728. case 'material_inventory':
  1729. await this.handleSaveInventoryEdit(data);
  1730. break;
  1731. // 计划信息
  1732. case 'material_plan':
  1733. await this.handleSavePlan(data);
  1734. break;
  1735. // 成本信息
  1736. case 'material_cost':
  1737. await this.handleSaveCost(data);
  1738. break;
  1739. default:
  1740. break;
  1741. }
  1742. // this.handleOtherRefresh();
  1743. },
  1744. // 其他页签详情弹窗关闭事件
  1745. handleCloseOtherDetails(done) {
  1746. console.log('其他页签详情弹窗关闭事件');
  1747. // 处于编辑状态
  1748. if (this.otherDeatils.isEdit) {
  1749. this.$notify({
  1750. title: '警告',
  1751. message: '请先退出编辑操作',
  1752. type: 'warning'
  1753. });
  1754. } else {
  1755. this.handleOtherListRefresh();
  1756. done();
  1757. }
  1758. },
  1759. // 折叠菜单改变
  1760. handleCollapseChange(val) {
  1761. console.log(val, '折叠菜单改变');
  1762. },
  1763. // 更新导入
  1764. handleUpdateImport() {
  1765. console.log('更新导入');
  1766. },
  1767. // 确认弹窗操作
  1768. async handleComfirmOption() {
  1769. console.log('确认弹窗操作');
  1770. this.optionDialog.show = false;
  1771. // 取消基本信息修改
  1772. if (this.updateButtonGroup) {
  1773. this.updateButtonGroup = false;
  1774. // this.handleRest();
  1775. await this.getMaterialDetails(this.materialId, 'material');
  1776. await this.getMedcineDetails(this.materialId, 'material_medcine');
  1777. this.$refs.basicMessageRef.clearValidate();
  1778. this.$refs.medcineRef.clearValidate();
  1779. }
  1780. // 取消其他主页签详情弹窗修改
  1781. if (this.otherDeatils.isEdit) {
  1782. this.otherDeatils.isEdit = false;
  1783. this.handleOtherRefresh();
  1784. }
  1785. // 取消维护新版本修改
  1786. if (this.maintainNewVersion) {
  1787. console.log('取消维护新版本修改');
  1788. this.maintainNewVersion = false;
  1789. this.handleRefresh();
  1790. }
  1791. },
  1792. // 参照弹窗过滤
  1793. handleFilterRefer() {
  1794. // this.MoreDataDialog.key =
  1795. console.log(this.MoreDataDialog.key, '查询关键字', this.MoreDataDialog.target);
  1796. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  1797. },
  1798. // 操作提示弹窗关闭
  1799. handleOptionCancal() {
  1800. this.optionDialog.show = false;
  1801. this.otherDeatils.isEdit = true;
  1802. },
  1803. // 树形节点选择
  1804. handleNodeClick(e) {
  1805. console.log(e, '树形节点选择', this.MoreDataDialog.target);
  1806. // let node = { ...e, name: e.label }
  1807. this.MoreDataDialog.value = e;
  1808. },
  1809. // 修改-更多数据表格——选择行
  1810. handleCurentRow(row) {
  1811. console.log(row, '修改-更多数据表格——选择行');
  1812. this.MoreDataDialog.value = row;
  1813. },
  1814. handleDbClick(row){
  1815. this.MoreDataDialog.value = row;
  1816. this.handleConfirmRefer();
  1817. },
  1818. // 参照弹窗确认
  1819. handleConfirmRefer() {
  1820. let _this = this;
  1821. console.log('确认参照弹窗', `{this.${this.MoreDataDialog.target.name}:${this.MoreDataDialog.value.id}}`);
  1822. let confirm = true;
  1823. if (this.MoreDataDialog.target.name == 'basicData') {
  1824. // 基本信息
  1825. this.basicData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1826. this.basicData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1827. console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
  1828. console.log(this.basicData.value[`${this.MoreDataDialog.target.prop}`], '值', this.basicData.value[`${this.MoreDataDialog.target.prop}Name`], '//////////基本信息///////////');
  1829. // 默认采购组织:purchasingOrganization 业务部门:businessDepartment
  1830. if (this.MoreDataDialog.target.prop == 'purchasingOrganization') {
  1831. this.basicData.value['businessDepartment'] = '';
  1832. this.basicData.value['businessDepartmentName'] = '';
  1833. }
  1834. } else if (this.MoreDataDialog.target.name == 'medcineData') {
  1835. // 医药信息
  1836. this.medcineData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1837. this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1838. console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
  1839. console.log(this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`], '//////医药信息//////////');
  1840. } else if (this.MoreDataDialog.target.name == 'otherDeatils') {
  1841. // 其他页签
  1842. this.otherDeatils.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1843. this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1844. console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`], '/////////其他页签///////');
  1845. } else if (this.MoreDataDialog.target.name == 'materialType') {
  1846. // 物料类别
  1847. console.log('确认时选择的数据', this.MoreDataDialog.value);
  1848. this.materialType.value = this.materialType.value.map(m => {
  1849. if ((m.id && m.id != '' && m.id == _this.MoreDataDialog.target.prop['id']) ||
  1850. (m.insertId && m.insertId == _this.MoreDataDialog.target.prop['insertId'])
  1851. ) {
  1852. let drug = _this.materialType.value.filter(d => d.drugId == _this.MoreDataDialog.value['id'])
  1853. console.log(drug, 'drug------------------------------------');
  1854. if (drug.length) {
  1855. _this.$notify({
  1856. title: '警告',
  1857. message: '不能维护相同的物料类别!',
  1858. type: 'warning'
  1859. });
  1860. confirm = false;
  1861. } else {
  1862. m.drugId = _this.MoreDataDialog.value['id'];
  1863. m.drugCode = _this.MoreDataDialog.value['code'];
  1864. m.drugName = _this.MoreDataDialog.value['name'];
  1865. }
  1866. }
  1867. return m;
  1868. })
  1869. console.log(this.materialType.value, '修改之后-----this.materialType.value');
  1870. }
  1871. if (confirm) {
  1872. // this.count++;
  1873. this.refer++;
  1874. this.MoreDataDialog.show = false;
  1875. this.MoreDataDialog.key = '';
  1876. this.MoreDataDialog.value = {};
  1877. }
  1878. },
  1879. // 取消-关闭参照弹窗
  1880. handleConcalRefer() {
  1881. console.log('关闭参照弹窗');
  1882. this.MoreDataDialog.show = false;
  1883. this.MoreDataDialog.key = '';
  1884. },
  1885. // 关闭参照弹窗前
  1886. handleCloseRefer(done) {
  1887. this.MoreDataDialog.key = '';
  1888. done();
  1889. },
  1890. // 删除利润中心信息
  1891. handledDelCenter(ids) {
  1892. console.log('删除利润中心信息');
  1893. materialApi.delCenter(ids).then(res => {
  1894. if (res.code == 200) {
  1895. this.handleOtherListRefresh();
  1896. }
  1897. })
  1898. },
  1899. // 删除库存信息
  1900. handleDelInventory(ids) {
  1901. console.log('删除库存信息');
  1902. materialApi.delInventory(ids).then(res => {
  1903. if (res.code == 200) {
  1904. this.handleOtherListRefresh();
  1905. }
  1906. })
  1907. },
  1908. // 删除成本信息
  1909. handleDelCost(ids) {
  1910. console.log('删除成本信息');
  1911. materialApi.delCost(ids).then(res => {
  1912. if (res.code == 200) {
  1913. this.handleOtherListRefresh();
  1914. }
  1915. })
  1916. },
  1917. // 删除计划信息
  1918. handleDelPlan(ids) {
  1919. console.log('删除计划信息');
  1920. materialApi.delPlan(ids).then(res => {
  1921. if (res.code == 200) {
  1922. this.handleOtherListRefresh();
  1923. }
  1924. })
  1925. },
  1926. // 删除财物信息
  1927. handleDelFinance(ids) {
  1928. console.log('删除财物信息');
  1929. materialApi.delFinance(ids).then(res => {
  1930. if (res.code == 200) {
  1931. this.handleOtherListRefresh();
  1932. }
  1933. })
  1934. },
  1935. // 删除采购信息
  1936. handledelPurchase(ids) {
  1937. console.log('删除采购信息');
  1938. materialApi.delPurchase(ids).then(res => {
  1939. if (res.code == 200) {
  1940. this.handleOtherListRefresh();
  1941. }
  1942. });
  1943. },
  1944. // 保存物料以及相关页签
  1945. handleSaveMaterial(cb) {
  1946. let param = {
  1947. ...this.basicData.value,
  1948. materialMedcine: this.medcineData.value,
  1949. materialMedcineItem: {}
  1950. };
  1951. // diCode
  1952. param.diCode = param.diCode.replace(/ /g, '');
  1953. console.log(param, '保存物料以及相关页签param');
  1954. materialApi.insertMaterialInfo(param).then(res => {
  1955. console.log(res, '保存物料以及相关页签');
  1956. if (res.code == 200) cb();
  1957. }).catch((error) => {
  1958. this.loading = false;
  1959. })
  1960. },
  1961. // 保存财务信息——单个数据
  1962. async handleSaveFinance(data) {
  1963. console.log(data, '保存财务信息——单个数据');
  1964. try {
  1965. this.otherDeatils.loading = true;
  1966. let {code,msg} = await materialApi.financeEdit(data);
  1967. if (code == 200) {
  1968. this.otherDeatils.isEdit = false;
  1969. this.handleOtherRefresh();
  1970. this.$notify({
  1971. title: '成功',
  1972. message: msg,
  1973. type: 'success'
  1974. });
  1975. }
  1976. } catch (error) {
  1977. }finally{
  1978. this.otherDeatils.loading = false;
  1979. }
  1980. // this.otherDeatils.loading = true;
  1981. // materialApi.financeEdit(data).then(res => {
  1982. // if (res.code == 200) {
  1983. // this.otherDeatils.isEdit = false;
  1984. // this.handleOtherRefresh();
  1985. // }
  1986. // this.otherDeatils.loading = false;
  1987. // })
  1988. },
  1989. // 保存利润中心信息
  1990. async handleSaveCenter(data) {
  1991. console.log(data, '保存利润中心信息');
  1992. try {
  1993. this.otherDeatils.loading = true;
  1994. let {code,msg} = await materialApi.centerEdit(data);
  1995. if (code == 200) {
  1996. this.otherDeatils.isEdit = false;
  1997. this.handleOtherRefresh();
  1998. this.$notify({
  1999. title: '成功',
  2000. message: msg,
  2001. type: 'success'
  2002. });
  2003. }
  2004. } catch (error) {}
  2005. finally{
  2006. this.otherDeatils.loading = false;
  2007. }
  2008. // materialApi.centerEdit(data).then(res => {
  2009. // if (res.code == 200) {
  2010. // this.otherDeatils.isEdit = false;
  2011. // this.handleOtherRefresh();
  2012. // }
  2013. // })
  2014. },
  2015. // 保存采购信息
  2016. async handleSavePurchase(data) {
  2017. console.log(data, '保存采购信息');
  2018. try {
  2019. this.otherDeatils.loading = true;
  2020. let {code,msg} = await materialApi.purchaseEdit(data);
  2021. if (code == 200) {
  2022. this.otherDeatils.isEdit = false;
  2023. this.handleOtherRefresh();
  2024. this.$notify({
  2025. title: '成功',
  2026. message: msg,
  2027. type: 'success'
  2028. });
  2029. }
  2030. } catch (error) {}
  2031. finally{
  2032. this.otherDeatils.loading = false;
  2033. }
  2034. // materialApi.purchaseEdit(data).then(res => {
  2035. // if (res.code == 200) {
  2036. // this.otherDeatils.isEdit = false;
  2037. // this.handleOtherRefresh();
  2038. // }
  2039. // })
  2040. },
  2041. // 保存库存信息
  2042. async handleSaveInventoryEdit(data) {
  2043. console.log(data, '保存库存信息');
  2044. try {
  2045. this.otherDeatils.loading = true;
  2046. let {code,msg} = await materialApi.inventoryEdit(data);
  2047. if (code == 200) {
  2048. this.otherDeatils.isEdit = false;
  2049. this.handleOtherRefresh();
  2050. this.$notify({
  2051. title: '成功',
  2052. message: msg,
  2053. type: 'success'
  2054. });
  2055. }
  2056. } catch (error) {}
  2057. finally{
  2058. this.otherDeatils.loading = false;
  2059. }
  2060. // materialApi.inventoryEdit(data).then(res => {
  2061. // if (res.code == 200) {
  2062. // this.otherDeatils.isEdit = false;
  2063. // this.handleOtherRefresh();
  2064. // }
  2065. // })
  2066. },
  2067. // 保存计划信息
  2068. async handleSavePlan(data) {
  2069. console.log(data, '保存计划信息');
  2070. try {
  2071. this.otherDeatils.loading = true;
  2072. let {code,msg} = await materialApi.planEdit(data);
  2073. if (code == 200) {
  2074. this.otherDeatils.isEdit = false;
  2075. this.handleOtherRefresh();
  2076. this.$notify({
  2077. title: '成功',
  2078. message: msg,
  2079. type: 'success'
  2080. });
  2081. }
  2082. } catch (error) {}
  2083. finally{
  2084. this.otherDeatils.loading = false;
  2085. }
  2086. // materialApi.planEdit(data).then(res => {
  2087. // if (res.code == 200) {
  2088. // this.otherDeatils.isEdit = false;
  2089. // this.handleOtherRefresh();
  2090. // }
  2091. // })
  2092. },
  2093. // 保存成本信息
  2094. async handleSaveCost(data) {
  2095. console.log(data, '保存成本信息');
  2096. try {
  2097. this.otherDeatils.loading = true;
  2098. let {code,msg} = await materialApi.costEdit(data);
  2099. if (code == 200) {
  2100. this.otherDeatils.isEdit = false;
  2101. this.handleOtherRefresh();
  2102. this.$notify({
  2103. title: '成功',
  2104. message: msg,
  2105. type: 'success'
  2106. });
  2107. }
  2108. } catch (error) {}
  2109. finally{
  2110. this.otherDeatils.loading = false;
  2111. }
  2112. // materialApi.costEdit(data).then(res => {
  2113. // if (res.code == 200) {
  2114. // this.otherDeatils.isEdit = false;
  2115. // this.handleOtherRefresh();
  2116. // }
  2117. // })
  2118. },
  2119. judgeIsRequriedByProps(message){
  2120. // condiition:条件,tergetNames:目标porps数组,formName:表单,formRef:表单ref名,
  2121. this[message.formName].form.forEach(formItem => {
  2122. let target = message.tergetNames.filter(t => t === formItem.prop);
  2123. if(target && target.length){
  2124. (formItem.required = message.condiition ? false : true);
  2125. }
  2126. })
  2127. this.rules = initRules(this[message.formName].form);
  2128. this.$nextTick( ()=> {
  2129. message.condiition && this.$refs[message.formRef].clearValidate(message.tergetNames);
  2130. })
  2131. },
  2132. // 重新加载
  2133. async handleRest() {
  2134. this.loading = true;
  2135. // 基本信息
  2136. await this.getTagList('material', (form) => {
  2137. this.basicData.form = [...form];
  2138. this.rules = initRules(form);
  2139. this.basicData.value = initParams(this.basicData.form,'prop')
  2140. this.getMaterialDetails(this.materialId, 'material');
  2141. })
  2142. // 医疗行业
  2143. await this.getTagList('material_medcine', (form) => {
  2144. form.forEach((item) => {
  2145. this.medcineData.value[item.prop] = ''
  2146. })
  2147. this.medcineData.form = form;
  2148. this.medcineData.value = initParams(this.medcineData.form,'prop')
  2149. this.medcineRules = initRules(form);
  2150. this.getMedcineDetails(this.materialId, 'material_medcine');
  2151. })
  2152. },
  2153. },
  2154. watch: {
  2155. // 监听主标签修改标识,控制其他标签是否禁止点击
  2156. 'updateButtonGroup': function (nVal, oVal) {
  2157. console.log(nVal, 'nVal', oVal, 'oVal');
  2158. this.detailsTabs = this.detailsTabs.map(item => {
  2159. item['disabled'] = nVal;
  2160. return item;
  2161. })
  2162. },
  2163. 'maintainNewVersion': function (nVal, oVal) {
  2164. console.log(nVal, 'nVal', oVal, 'oVal');
  2165. this.detailsTabs = this.detailsTabs.map(item => {
  2166. item['disabled'] = nVal;
  2167. return item;
  2168. })
  2169. },
  2170. "basicData.value.isMedicine": {
  2171. handler(nVal, oVal) {
  2172. this.basicData.form = this.basicData.form.map(formItem => {
  2173. if (formItem.prop === 'productionPermit') {
  2174. formItem.required = nVal == '0' ? true : false;
  2175. }
  2176. return formItem;
  2177. })
  2178. },
  2179. deep: true,
  2180. },
  2181. // 通过一级分类判断业务线是否必填
  2182. // "basicData.value.oneClass": {
  2183. // handler(nVal, oVal) {
  2184. // this.basicData.form = this.basicData.form.map(formItem => {
  2185. // if (formItem.prop === "businessLine" && nVal) {
  2186. // if ( nVal.includes('介入耗材&5') || nVal.includes('骨科耗材&2') ||
  2187. // nVal.includes('普通耗材&3') || nVal.includes('医用设备&1') ||
  2188. // nVal.includes('体外诊断&4')) {
  2189. // formItem.required = true
  2190. // } else {
  2191. // formItem.required = false
  2192. // }
  2193. // }
  2194. // return formItem;
  2195. // })
  2196. // },
  2197. // deep: true,
  2198. // },
  2199. // 物料分类改变同时改变一二三级分类
  2200. "basicData.value.classifyId": {
  2201. async handler(nVal, oVal) {
  2202. if(nVal !== oVal){
  2203. try {
  2204. let {code, data } = await getDetail(nVal);
  2205. if( code == 200){
  2206. let {oneClass,twoClass,threeClass} = data;
  2207. this.basicData.value['oneClass'] = oneClass;
  2208. this.basicData.value['twoClass'] = twoClass;
  2209. this.basicData.value['threeClass'] = threeClass;
  2210. }
  2211. } catch (error) {}
  2212. }
  2213. },
  2214. deep: true,
  2215. },
  2216. // 效期管理 expiryDateManagerment 控制 expiryUnitId 效期单位 usefulLife 有效期 usefulLifeUnitId 有效期至单位 必填
  2217. "basicData.value.expiryDateManagerment":{
  2218. handler(nVal, oVal) {
  2219. this.judgeIsRequriedByProps({
  2220. condiition:(nVal === '2'),
  2221. tergetNames:['expiryUnitId','usefulLife','usefulLifeUnitId','recentWarningPeriod'],
  2222. formName:'basicData',
  2223. formRef:'basicMessageRef',
  2224. })
  2225. },
  2226. deep: true,
  2227. },
  2228. },
  2229. created() {
  2230. console.log(this, 'created');
  2231. // 基本信息
  2232. this.handleRest();
  2233. if (window.name === '') {
  2234. this.$route.query.isEdit && this.handleBasicEdit();
  2235. } else {
  2236. console.log('页面被刷新')
  2237. }
  2238. }
  2239. }
  2240. </script>
  2241. <style lang="scss">
  2242. .material-details {
  2243. padding: 12px;
  2244. height: 100%;
  2245. // height: calc(100vh - 158px);
  2246. box-sizing: border-box;
  2247. .el-card__body {
  2248. height: calc(100vh - 40px);
  2249. // height: 100%;
  2250. box-sizing: border-box;
  2251. padding: 12px;
  2252. overflow-y: auto;
  2253. overflow-x: auto;
  2254. .el-select {
  2255. width: 100%;
  2256. }
  2257. }
  2258. .md-content {
  2259. margin-top: 12px;
  2260. // height: calc(100vh - 260px);
  2261. height: calc(100vh - 228px);
  2262. box-sizing: border-box;
  2263. .md-basic {
  2264. overflow: auto;
  2265. .md-main {
  2266. // height: calc(100vh - 625px);
  2267. margin-bottom: 10px;
  2268. .el-table__body {
  2269. // height: calc(100vh - 300px);
  2270. }
  2271. .el-form {
  2272. max-height: 350px;
  2273. overflow-y: auto;
  2274. overflow-x: hidden;
  2275. .redSpan::before {
  2276. content: "* ";
  2277. color: red;
  2278. }
  2279. .el-checkbox {
  2280. padding: 0 58%;
  2281. }
  2282. }
  2283. }
  2284. .md-vice-content {
  2285. height: 140px;
  2286. overflow-y: auto;
  2287. overflow-x: hidden;
  2288. }
  2289. }
  2290. .md-auditInfo {
  2291. .el-divider--horizontal {
  2292. margin: 20px 0px 15px;
  2293. }
  2294. }
  2295. }
  2296. // .md-content>.el-tabs {
  2297. // height: calc(100vh - 280px);
  2298. // }
  2299. .otherDialog {
  2300. .el-collapse-item__content {
  2301. padding-bottom: 12px;
  2302. }
  2303. .el-form {
  2304. .el-checkbox {
  2305. width: 100%;
  2306. padding: 0 10%;
  2307. }
  2308. }
  2309. .el-dialog__body {
  2310. padding: 12px 20px;
  2311. height: 80%;
  2312. overflow: auto;
  2313. }
  2314. .od-msg {
  2315. max-height: 220px;
  2316. box-sizing: border-box;
  2317. overflow-y: auto;
  2318. overflow-x: hidden;
  2319. }
  2320. // .el-dialog__header {
  2321. // background-color: rgb(244, 244, 244);
  2322. // }
  2323. }
  2324. .el-dialog__header {
  2325. background-color: rgb(244, 244, 244);
  2326. }
  2327. .MoreDataDialog {
  2328. .el-dialog__body {
  2329. height: 500px;
  2330. padding: 20px 15px;
  2331. .el-table {
  2332. margin-top: 10px;
  2333. .el-table__body-wrapper {
  2334. height: 300px;
  2335. overflow-y: auto;
  2336. overflow-x: hidden;
  2337. }
  2338. }
  2339. .el-pagination {
  2340. text-align: right;
  2341. margin-top: 5px;
  2342. }
  2343. .referTree {
  2344. height: 390px;
  2345. overflow-x: hidden;
  2346. overflow-y: auto;
  2347. }
  2348. }
  2349. .more-button {
  2350. margin-top: 10px;
  2351. text-align: right;
  2352. }
  2353. }
  2354. }
  2355. // 修改下拉框样式
  2356. #selected {
  2357. /*很关键:将默认的select选择框样式清除*/
  2358. // appearance: none;
  2359. // -moz-appearance: none;
  2360. // -webkit-appearance: none;
  2361. // /*为下拉小箭头留出一点位置,避免被文字覆盖*/
  2362. // padding-right: 14px;
  2363. // /*自定义图片*/
  2364. // background: url("../images/search@2x.png") no-repeat scroll right center transparent;
  2365. // /*自定义图片的大小*/
  2366. // background-size: 16px 16px;
  2367. // /*将小箭头的样式去去掉*/
  2368. // .el-icon-arrow-up:before {
  2369. // content: '';
  2370. // }
  2371. // }
  2372. }
  2373. </style>
  2374. <style scoped>
  2375. .md-content >>> .el-form-item,
  2376. .otherDialog >>> .el-form-item {
  2377. margin-bottom: 10px;
  2378. }
  2379. .md-content >>> .el-tabs--border-card > .el-tabs__content {
  2380. padding-bottom: 8px;
  2381. }
  2382. .md-content .md-auditInfo >>> .el-form-item {
  2383. margin-bottom: 0px;
  2384. }
  2385. .md-main >>> .el-form-item,
  2386. .md-vice >>> .el-form-item,
  2387. .od-msg >>> .el-form-item {
  2388. width: 100%;
  2389. box-sizing: border-box;
  2390. }
  2391. .md-main >>> .el-form-item__label,
  2392. .md-vice >>> .el-form-item__label,
  2393. .od-msg >>> .el-form-item__label {
  2394. width: 40%;
  2395. }
  2396. .od-msg >>> .el-checkbox__input {
  2397. width: 15%;
  2398. }
  2399. .md-main >>> .el-form-item__content,
  2400. .md-vice >>> .el-form-item__content,
  2401. .od-msg >>> .el-form-item__content {
  2402. width: 60%;
  2403. box-sizing: border-box;
  2404. height: 36px;
  2405. }
  2406. .od-msg >>> .el-checkbox__label {
  2407. width: 85%;
  2408. box-sizing: border-box;
  2409. }
  2410. .od-msg-checkedbx >>> .el-form-item__content {
  2411. width: 80%;
  2412. box-sizing: border-box;
  2413. }
  2414. .od-msg-checkedbx >>> .el-checkbox {
  2415. width: 75%;
  2416. box-sizing: border-box;
  2417. }
  2418. .md-content >>> .el-form-item__label,
  2419. .otherDialog >>> .el-form-item__label,
  2420. .od-msg >>> .el-form-item__label,
  2421. .od-msg >>> .el-checkbox__label {
  2422. font-weight: normal;
  2423. /* text-align: left;
  2424. width: 28%; */
  2425. white-space: nowrap;
  2426. /* IE6 需要定义宽度 */
  2427. overflow: hidden;
  2428. -o-text-overflow: ellipsis;
  2429. /* Opera */
  2430. text-overflow: ellipsis;
  2431. /* IE, Safari (WebKit) */
  2432. /* -moz-binding: url('ellipsis.xml#ellipsis'); */
  2433. /* Firefox */
  2434. }
  2435. .otherDialog >>> .el-form-item__label {
  2436. font-size: 12px;
  2437. }
  2438. .md-main >>> .material-table {
  2439. height: 100%;
  2440. }
  2441. .md-vice >>> .material-table {
  2442. height: 140px;
  2443. overflow-y: auto;
  2444. overflow-x: auto;
  2445. }
  2446. >>> .referTree {
  2447. margin-top: 10px;
  2448. }
  2449. /* .md-main>>>.el-table .el-table__body {
  2450. height: calc(100vh - 300px);
  2451. } */
  2452. /* .otherDialog>>>.el-collapse-item__content {
  2453. padding-bottom: 12px;
  2454. }
  2455. .otherDialog>>>.el-dialog__body {
  2456. padding: 12px 20px;
  2457. } */
  2458. </style>