add.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  1. <template>
  2. <div id="addDemandList">
  3. <span>基本信息</span>
  4. <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
  5. <el-row :gutter="10">
  6. <el-col :span="1.5">
  7. <el-form-item label="编码">
  8. <el-input
  9. v-model="basicForm.code"
  10. size="small"
  11. disabled
  12. style="width: 200px"
  13. />
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="1.5">
  17. <el-form-item label="组织">
  18. <el-select clearable size="small" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
  19. <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
  20. </el-select>
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="1.5">
  24. <el-form-item label="需求处理方式">
  25. <el-select disabled v-model="basicForm.demandBusinessType" size="small" style="width: 200px">
  26. <el-option v-for="dict in dict.type.sys_processing_mode" :key="dict.value" :label="dict.label" :value="dict.value">
  27. </el-option>
  28. </el-select>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="1.5">
  32. <el-form-item label="单据状态">
  33. <el-select disabled v-model="basicForm.status" size="small" style="width: 200px">
  34. <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="1.5">
  40. <el-form-item label="需求客户">
  41. <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
  42. <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
  43. </el-select>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="1.5">
  47. <el-form-item label="需求客户名称">
  48. <el-input disabled v-model="basicForm.customerName" size="small" style="width: 200px"></el-input>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="1.5">
  52. <el-form-item label="客户负责人">
  53. <el-input disabled v-model="basicForm.customerPrincipal" size="small" style="width: 200px"></el-input>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="1.5">
  57. <el-form-item label="需求人员">
  58. <el-select clearable size="small" v-model="basicForm.demandPersonal" :disabled="sonDisable" @focus="chooseOrg('CONTACTS_PARAM', true, '需求人员')" style="width: 200px">
  59. <el-option v-for="item in personOptions" :key="item.id" :label="item.name" :value="item.code" />
  60. </el-select>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :span="1.5">
  64. <el-form-item label="需求部门">
  65. <el-select clearable v-model="basicForm.demandDept" size="small" :disabled="sonDisable" @focus="chooseOrg('DEPT_PARAM', true, '需求部门')" style="width: 200px">
  66. <el-option
  67. v-for="item in deptOptions"
  68. :key="item.id"
  69. :label="item.name"
  70. :value="item.id">
  71. </el-option>
  72. </el-select>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="1.5">
  76. <el-form-item label="需求日期">
  77. <el-date-picker
  78. v-model="basicForm.demandDate"
  79. :disabled="sonDisable"
  80. clearable
  81. type="date"
  82. value-format="yyyy-MM-dd"
  83. size="small"
  84. style="width: 200px"
  85. >
  86. </el-date-picker>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="1.5">
  90. <el-form-item label="单据来源">
  91. <el-select v-model="basicForm.source" disabled size="small" style="width: 200px">
  92. <el-option v-for="dict in dict.type.sys_bill_source" :key="dict.value" :label="dict.label" :value="dict.value">
  93. </el-option>
  94. </el-select>
  95. </el-form-item>
  96. </el-col>
  97. <el-col :span="1.5">
  98. <el-form-item label="业务类型">
  99. <el-select clearable v-model="basicForm.billType" @change="changeBillType" :disabled="sonDisable" size="small" style="width: 200px">
  100. <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
  101. </el-option>
  102. </el-select>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="1.5">
  106. <el-form-item label="是否客户指定">
  107. <el-select clearable v-model="basicForm.isSpeical" :disabled="sonDisable" size="small" style="width: 200px">
  108. <el-option v-for=" item in options" :key="item.value" :label="item.label" :value="item.value">
  109. </el-option>
  110. </el-select>
  111. </el-form-item>
  112. </el-col>
  113. <!-- <el-col :span="1.5">
  114. <el-form-item label="是否处理需求">
  115. <el-input
  116. v-model="basicForm.isProcess"
  117. size="small"
  118. placeholder=""
  119. clearable
  120. style="width: 200px"
  121. />
  122. </el-form-item>
  123. </el-col> -->
  124. <el-col :span="1.5">
  125. <el-form-item label="备注">
  126. <el-input
  127. v-model.trim="basicForm.remark"
  128. size="small"
  129. :disabled="sonDisable"
  130. clearable
  131. style="width: 200px"
  132. />
  133. </el-form-item>
  134. </el-col>
  135. </el-row>
  136. <span>明细信息</span>
  137. <el-card>
  138. <div class="btn_grooup">
  139. <el-button type="primary" size="small" @click="addLine" v-if="!sonDisable">增行</el-button>
  140. <el-button type="primary" size="small" v-if="!sonDisable">批量调整</el-button>
  141. <el-button type="primary" size="small" v-if="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
  142. </div>
  143. <el-table
  144. :data="basicForm.puDemandItemList"
  145. fit
  146. max-height="300"
  147. @selection-change="handleSelectionChange"
  148. >
  149. <el-table-column show-overflow-tooltip type="selection"/>
  150. <el-table-column show-overflow-tooltip label="序号" type="index" align="center"/>
  151. <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="150px"/>
  152. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo" />
  153. <!-- <el-table-column show-overflow-tooltip label="业务部门名称" align="center" width="180px"/> -->
  154. <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" width="180px"/> -->
  155. <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="demandCustomerName" width="200px"/>
  156. <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="180px">
  157. <template slot-scope="scope">
  158. <el-form-item class="hang">
  159. <el-input readonly size="small" v-model="scope.row.materialClassifyOneName"/>
  160. </el-form-item>
  161. </template>
  162. </el-table-column>
  163. <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="180px">
  164. <template slot-scope="scope">
  165. <el-form-item class="hang">
  166. <el-input readonly size="small" v-model="scope.row.materialClassifyTwoName"/>
  167. </el-form-item>
  168. </template>
  169. </el-table-column>
  170. <el-table-column show-overflow-tooltip label="三级品类" align="center" prop="materialClassifyThreeName" width="180px">
  171. <template slot-scope="scope">
  172. <el-form-item class="hang">
  173. <el-input readonly size="small" v-model="scope.row.materialClassifyThreeName"/>
  174. </el-form-item>
  175. </template>
  176. </el-table-column>
  177. <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="180px">
  178. <template slot-scope="scope">
  179. <el-form-item class="hang">
  180. <el-input readonly size="small" v-model="scope.row.materialClassifyFourName"/>
  181. </el-form-item>
  182. </template>
  183. </el-table-column>
  184. <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
  185. <template slot-scope="scope">
  186. <el-form-item class="hang">
  187. <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.reservedProportion">
  188. <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
  189. </el-option>
  190. </el-select>
  191. <!-- <el-input v-model="scope.row.reservedProportion"/> -->
  192. </el-form-item>
  193. </template>
  194. </el-table-column>
  195. <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="150px">
  196. <template slot-scope="scope">
  197. <el-form-item class="hang">
  198. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.reservedPeriod"/>
  199. </el-form-item>
  200. </template>
  201. </el-table-column>
  202. <el-table-column show-overflow-tooltip label="预留数量" align="center" prop="reservedQty" width="150px">
  203. <template slot-scope="scope">
  204. <el-form-item class="hang">
  205. <el-input readonly size="small" v-model="scope.row.reservedQty"/>
  206. </el-form-item>
  207. </template>
  208. </el-table-column>
  209. <el-table-column show-overflow-tooltip label="采购员名称" align="center" prop="buyerName" width="120px"/>
  210. <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyer"/>
  211. <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
  212. <template slot-scope="scope">
  213. <el-form-item class="hang">
  214. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.materialCode" @focus="chooseMaterial(scope.$index)">
  215. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
  216. </el-input>
  217. </el-form-item>
  218. </template>
  219. </el-table-column>
  220. <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName" width="230px" />
  221. <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification" />
  222. <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
  223. <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName"/>
  224. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="230px"/>
  225. <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="150px"/>
  226. <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod" width="150px">
  227. <template slot-scope="scope">
  228. <el-form-item class="hang">
  229. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.puPeriod"/>
  230. </el-form-item>
  231. </template>
  232. </el-table-column>
  233. <el-table-column show-overflow-tooltip label="有效期" align="center" prop="expiry" width="120px"/>
  234. <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="120px"/>
  235. <el-table-column show-overflow-tooltip label="最小包装" align="center" prop="minPackage" width="120px"/>
  236. <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" width="120px"/>
  237. <el-table-column show-overflow-tooltip label="最小批量" align="center" prop="minBatch" width="120px"/>
  238. <el-table-column show-overflow-tooltip label="安全库存" align="center" prop="safeStock" width="120px">
  239. <template slot-scope="scope">
  240. <el-form-item class="hang">
  241. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.safeStock"/>
  242. </el-form-item>
  243. </template>
  244. </el-table-column>
  245. <el-table-column show-overflow-tooltip label="月均销量" align="center" prop="averageQtyMonth" width="120px"/>
  246. <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="120px">
  247. <template slot-scope="scope">
  248. <el-form-item class="hang">
  249. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
  250. </el-form-item>
  251. </template>
  252. </el-table-column>
  253. <el-table-column show-overflow-tooltip label="需求可用周期" align="center" prop="demandPeriod" width="120px"/>
  254. <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassify" width="120px"/>
  255. <el-table-column show-overflow-tooltip label="交货日期" align="center" prop="deliveryDate" width="230px">
  256. <template slot-scope="scope">
  257. <el-form-item class="hang">
  258. <el-date-picker
  259. v-model="scope.row.deliveryDate"
  260. :readonly="sonDisable"
  261. clearable
  262. type="datetime"
  263. size="small"
  264. value-format="yyyy-MM-dd HH:mm:ss"
  265. placeholder="选择日期">
  266. </el-date-picker>
  267. </el-form-item>
  268. </template>
  269. </el-table-column>
  270. <el-table-column show-overflow-tooltip label="补单标识" align="center" prop="isReplenishment" width="100px">
  271. <template slot-scope="scope">
  272. <el-form-item class="hang">
  273. <el-switch
  274. v-model="scope.row.isReplenishment"
  275. disabled
  276. active-value="Y"
  277. inactive-value="N"
  278. active-color="#13ce66"
  279. inactive-color="#a1a3a9">
  280. </el-switch>
  281. </el-form-item>
  282. </template>
  283. </el-table-column>
  284. <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
  285. <template slot-scope="scope">
  286. <el-form-item class="hang">
  287. <el-switch
  288. v-model="scope.row.isBatchLock"
  289. :disabled="sonDisable"
  290. active-value="Y"
  291. inactive-value="N"
  292. active-color="#13ce66"
  293. inactive-color="#a1a3a9">
  294. </el-switch>
  295. </el-form-item>
  296. </template>
  297. </el-table-column>
  298. <el-table-column show-overflow-tooltip label="业务备注" align="center" prop="remark" width="150px">
  299. <template slot-scope="scope">
  300. <el-form-item class="hang">
  301. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.remark"/>
  302. </el-form-item>
  303. </template>
  304. </el-table-column>
  305. <el-table-column show-overflow-tooltip label="采购备注" align="center" prop="puRemark" width="150px"/>
  306. <!-- <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center" prop="lastWarehouseQty" /> -->
  307. <el-table-column show-overflow-tooltip label="调拨占有量" align="center" prop="superiorAllotQty" width="150px"/>
  308. <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="150px">
  309. <template slot-scope="scope">
  310. <el-form-item class="hang">
  311. <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.resDemandQty"/>
  312. </el-form-item>
  313. </template>
  314. </el-table-column>
  315. <el-table-column show-overflow-tooltip label="收货仓库" align="center" prop="deliveryWarehouseName" width="200px">
  316. <template slot-scope="scope">
  317. <el-form-item class="hang">
  318. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
  319. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
  320. </el-input>
  321. </el-form-item>
  322. </template>
  323. </el-table-column>
  324. <el-table-column show-overflow-tooltip label="收货货位" align="center" prop="deliveryAllocationName" width="200px">
  325. <template slot-scope="scope">
  326. <el-form-item class="hang">
  327. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
  328. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
  329. </el-input>
  330. </el-form-item>
  331. </template>
  332. </el-table-column>
  333. <!-- <el-table-column show-overflow-tooltip label="收货货位编码" align="center" prop="deliveryAllocation" width="200px"/> -->
  334. <el-table-column show-overflow-tooltip label="末级供应仓库" align="center" prop="lastWarehouseName" width="200px"/>
  335. <el-table-column show-overflow-tooltip label="末级供应货位" align="center" prop="lastAllocationName" width="200px"/>
  336. <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
  337. <template slot-scope="scope">
  338. <el-form-item class="hang">
  339. <el-switch
  340. v-model="scope.row.isUrgency"
  341. disabled
  342. active-value="Y"
  343. inactive-value="N"
  344. active-color="#13ce66"
  345. inactive-color="#a1a3a9">
  346. </el-switch>
  347. </el-form-item>
  348. </template>
  349. </el-table-column>
  350. <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purOrgName" width="200px"/>yu
  351. <el-table-column show-overflow-tooltip label="默认采购组织编码" align="center" prop="puOrg" width="200px"/>
  352. <!-- <el-table-column show-overflow-tooltip label="末级供应调拨待入量" align="center" prop="lastStockQty" width="150px"/> -->
  353. <!-- <el-table-column show-overflow-tooltip label="上级供应中心现存量" align="center" prop="superiorCenterQty" width="200px"/> -->
  354. <!-- <el-table-column show-overflow-tooltip label="上级库存被调拨占用量" align="center" prop="superiorAllotQty" width="200px"/> -->
  355. <!-- <el-table-column show-overflow-tooltip label="可用量" align="center" prop="availableQty"/> -->
  356. <el-table-column show-overflow-tooltip label="调拨状态" align="center" prop="statusAllot" width="100px">
  357. <template slot-scope="scope">
  358. <el-form-item class="hang">
  359. <el-switch
  360. v-model="scope.row.statusAllot"
  361. :disabled="sonDisable"
  362. active-value="Y"
  363. inactive-value="N"
  364. active-color="#13ce66"
  365. inactive-color="#a1a3a9">
  366. </el-switch>
  367. </el-form-item>
  368. </template>
  369. </el-table-column>
  370. <el-table-column show-overflow-tooltip label="补单供应商编码" align="center" prop="additionalSupplier" width="200px">
  371. <template slot-scope="scope">
  372. <el-form-item class="hang">
  373. <el-input clearable :disabled="sonDisable || BDZT" size="small" v-model="scope.row.additionalSupplier" @clear="clearHang(scope.$index, '选择补单供应商')" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
  374. <el-button size="small" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
  375. </el-input>
  376. </el-form-item>
  377. </template>
  378. </el-table-column>
  379. <el-table-column show-overflow-tooltip label="补单供应商名称" align="center" prop="additionalSupplierName" width="200px">
  380. <template slot-scope="scope">
  381. <el-form-item class="hang">
  382. <el-input readonly size="small" v-model="scope.row.additionalSupplierName"/>
  383. </el-form-item>
  384. </template>
  385. </el-table-column>
  386. <!-- <el-table-column show-overflow-tooltip label="周期单位" align="center" prop="periodUnit" width="150px">
  387. <template slot-scope="scope">
  388. <el-form-item class="hang">
  389. <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.periodUnit">
  390. <el-option v-for=" dict in dict.type.sys_period_unit" :key="dict.value" :label="dict.label" :value="dict.value">
  391. </el-option>
  392. </el-select>
  393. </el-form-item>
  394. </template>
  395. </el-table-column> -->
  396. <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="superiorStockOrgName" width="200px"></el-table-column>
  397. <el-table-column show-overflow-tooltip label="中心仓可用量" align="center" prop="centralWarehouseQty" width="200px"/>
  398. <el-table-column show-overflow-tooltip label="调拨单号" align="center" prop="allotCode"></el-table-column>
  399. <el-table-column show-overflow-tooltip label="收货地址" align="center" prop="deliveryAddressName" width="200px">
  400. <template slot-scope="scope">
  401. <el-form-item class="hang">
  402. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
  403. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
  404. </el-input>
  405. </el-form-item>
  406. </template>
  407. </el-table-column>
  408. <el-table-column show-overflow-tooltip label="收货地址编码" align="center" prop="deliveryAddress" width="200px"></el-table-column>
  409. <el-table-column show-overflow-tooltip label="联系人" align="center" prop="contacts"/>
  410. <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="200px"/>
  411. <el-table-column show-overflow-tooltip label="详细地址" align="center" prop="address" width="200px"/>
  412. <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="150px">
  413. <template slot-scope="scope">
  414. <el-form-item class="hang">
  415. <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.priceType">
  416. <el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
  417. </el-option>
  418. </el-select>
  419. <!-- <el-input v-model="scope.row.periodUnit"/> -->
  420. </el-form-item>
  421. </template>
  422. </el-table-column>
  423. <el-table-column
  424. fixed="right"
  425. label="操作"
  426. align="center"
  427. >
  428. <template slot-scope="scope">
  429. <el-button type="text" size="small" :disabled="sonDisable" @click="delLine(scope.$index, scope.row)">删除</el-button>
  430. </template>
  431. </el-table-column>
  432. </el-table>
  433. </el-card>
  434. </el-form>
  435. <div class="btn_group">
  436. <el-col :span="1.5">
  437. <el-button type="primary" size="small" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
  438. </el-col>
  439. <el-col :span="1.5">
  440. <el-button type="primary" size="small" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
  441. </el-col>
  442. <el-col :span="1.5" style="margin: 0 10px;">
  443. <el-button type="primary" size="small" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
  444. </el-col>
  445. <el-col :span="1.5">
  446. <el-button size="small" plain @click="back">返回</el-button>
  447. </el-col>
  448. <Reserved v-if="dialog.config" :isVisible="dialog.config" :info="row" @updateReserved="updateReserved"/>
  449. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
  450. <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
  451. </div>
  452. </div>
  453. </template>
  454. <script>
  455. import Reserved from './reserved.vue'
  456. import Refers from '@/components/Refers/refers.vue'
  457. import {addDemand,getDemandDetail, getDemandSonDetail, editDemand, submitDemand, queryMan } from '@/api/purchase/purchaseDemand.js'
  458. // 用于回显参照框数据
  459. import {getRefer} from '@/api/purchase/basic.js'
  460. // 明细行选择物料参照
  461. import popDialog from '@/components/PopDialog/index.vue'
  462. export default {
  463. name: 'addDemandList',
  464. props: ['pageStu','row', 'disable'],
  465. dicts: ['sys_processing_mode', 'sys_status', 'sys_bill_source', 'sys_business','sys_reserve_ratio', 'sys_period_unit', 'sys_price_type'],
  466. components: {
  467. Reserved,
  468. Refers,
  469. popDialog
  470. },
  471. model: {
  472. prop: 'isList',
  473. event: 'jugislist'
  474. },
  475. data() {
  476. return {
  477. // 不能直接改变props传来的值
  478. sonPageStu: this.pageStu,
  479. sonDisable: this.disable,
  480. // BDZT是补单供应商是否可以编辑条件
  481. BDZT: true,
  482. dialog: {
  483. config: false
  484. },
  485. basicForm: {
  486. code: '',
  487. org: '',
  488. orgName: '',
  489. demandBusinessType: '1',
  490. status: '0',
  491. customer: '',
  492. customerName: '',
  493. customerCode: '',
  494. customerPrincipal: '',
  495. demandPersonal: '',
  496. demandDept: '',
  497. demandDate: '',
  498. source: '4',
  499. billType: '',
  500. isSpeical: '',
  501. isProcess: '',
  502. isMonthleyCalculate: '',
  503. remark: '',
  504. puDemandItemList: []
  505. },
  506. options: [{
  507. value: 'Y', label: '是',
  508. }, {
  509. value: 'N', label: '否'
  510. }],
  511. basicRules: {},
  512. tableList: [],
  513. referCondition: {
  514. type: '',
  515. isPage: true,
  516. title: '',
  517. },
  518. referConditionMx: {
  519. type: '',
  520. isPage: true,
  521. title: '',
  522. },
  523. tableIndex: null,
  524. orgOptions: [],
  525. personOptions: [],
  526. deptOptions: [],
  527. customerOptions: [],
  528. }
  529. },
  530. created() {
  531. if(this.pageStu == 'check') {
  532. console.log('数据', this.row)
  533. this.getDetails(this.row)
  534. } else if(this.pageStu == 'edit') {
  535. this.getDetails(this.row)
  536. }
  537. },
  538. methods: {
  539. // 更改业务类型调整明细行内补单或紧急标识
  540. changeBillType() {
  541. if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
  542. this.BDZT = false
  543. this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
  544. } else {
  545. this.BDZT = true
  546. this.basicForm.puDemandItemList.forEach(item => {
  547. item.isReplenishment = 'N'
  548. item.additionalSupplier = null
  549. item.additionalSupplierName = null
  550. })
  551. }
  552. if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
  553. this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
  554. } else {
  555. this.basicForm.puDemandItemList.forEach(item => { item.isUrgency = 'N' })
  556. }
  557. },
  558. hangStatus(row) {
  559. switch (row.status) {
  560. case '0':
  561. return '需补货'
  562. case '1':
  563. return '待采购确认'
  564. case '2':
  565. return '采购已确认'
  566. case '3':
  567. return '采购已审核'
  568. case '4':
  569. return '行关闭'
  570. case '5':
  571. return '总供应可满足'
  572. }
  573. },
  574. copy() {
  575. this.$modal.msgSuccess("复制成功");
  576. this.sonPageStu = 'add'
  577. this.sonDisable = false
  578. this.getDetails(this.row)
  579. this.basicForm.id = ''
  580. this.basicForm.code = ''
  581. },
  582. handleData() {
  583. console.log('222')
  584. // 复制新增把id,编码置为空,子表去掉id
  585. this.basicForm.id = ''
  586. this.basicForm.code = ''
  587. if (this.basicForm.puDemandItemList.length !== 0) {
  588. this.basicForm.puDemandItemList.forEach(item => {
  589. if (item.id) {
  590. delete item.id
  591. }
  592. if (item.demandId) {
  593. delete item.demandId
  594. }
  595. })
  596. }
  597. },
  598. async save() {
  599. if(this.basicForm.puDemandItemList.length !== 0) {
  600. if(this.sonPageStu == 'add') {
  601. await this.handleData()
  602. await addDemand(this.basicForm).then(res => {
  603. console.log(333)
  604. if (res.code === 200) {
  605. this.$modal.msgSuccess("保存成功");
  606. this.back()
  607. }
  608. })
  609. } else if (this.sonPageStu == 'edit') {
  610. editDemand(this.basicForm).then(res => {
  611. if (res.code === 200) {
  612. this.$modal.msgSuccess("编辑成功");
  613. this.back()
  614. }
  615. })
  616. }
  617. } else {
  618. this.$modal.msgWarning("明细信息不能为空!");
  619. }
  620. },
  621. submit() {
  622. submitDemand(this.basicForm).then(res => {
  623. if (res.code === 200) {
  624. this.$modal.msgSuccess("提交成功");
  625. this.back()
  626. }
  627. })
  628. },
  629. // 增行
  630. addLine() {
  631. const newLine = {
  632. contacts: null,
  633. id: null,
  634. demandId: null,
  635. status: null,
  636. businessDept: null,
  637. businessDeptName: null,
  638. materialCategory: null,
  639. buyer: null,
  640. buyerName: null,
  641. mateiralClassifyOne: null,
  642. materialClassifyOneName: null,
  643. materialClassifyTwo: null,
  644. materialClassifyTwoName: null,
  645. materialClassifyThree: null,
  646. materialClassifyThreeName: null,
  647. materialClassifyFour: null,
  648. materialClassifyFourName: null,
  649. materialCode: null,
  650. material: null,
  651. materialName: null,
  652. classifyId: null,
  653. specification: null,
  654. unit: null,
  655. unitName: null,
  656. manufacturerName: null,
  657. registrant: null,
  658. puPeriod: null,
  659. expiryUnit: null,
  660. expiry: null,
  661. minPackage: null,
  662. minOrderQty: null,
  663. minBatch: null,
  664. safeStock: null,
  665. averageQtyMonth: null,
  666. qty: null,
  667. adjustmentPersonal: null,
  668. adjustmentTime: null,
  669. manualRegulation: null,
  670. updateCause: null,
  671. reservedProportion: null,
  672. reservedPeriod: null,
  673. reservedQty: null,
  674. demandPeriod: null,
  675. forecastClassify: null,
  676. deliveryDate: null,
  677. isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
  678. isReplenishment: this.basicForm.billType == 'BDXQ'? 'Y': 'N',
  679. isBatchLock: 'N',
  680. remark: null,
  681. puRemark: null,
  682. lastWarehouseQty: null,
  683. resDemandQty: null,
  684. lastWarehouse: null,
  685. lastWarehouseName: null,
  686. deliveryWarehouse: null,
  687. deliveryWarehouseName: null,
  688. lastAllocation: null,
  689. lastAllocationName: null,
  690. deliveryAllocation: null,
  691. deliveryAllocationName: null,
  692. passageOn: null,
  693. puOrg: null,
  694. purOrgName: null,
  695. lastStockQty: null,
  696. superiorCenterQty: null,
  697. superiorAllotQty: null,
  698. availableQty: null,
  699. statusAllot: 'N',
  700. additionalSupplier: null,
  701. additionalSupplierName: null,
  702. periodUnit: null,
  703. demandCustomer: this.basicForm.customer,
  704. demandCustomerName: this.basicForm.customerName,
  705. businessDept: this.basicForm.demandDept,
  706. businessDeptName: null,
  707. lastStockOrg: null,
  708. lastStockOrgName: null,
  709. superiorStockOrg: null,
  710. superiorStockOrgName: null,
  711. allotCode: null,
  712. deliveryAddress: null,
  713. deliveryAddressName: null,
  714. contacts: null,
  715. contactsPhone: null,
  716. address: null,
  717. source: null,
  718. priceType: null,
  719. puManagerApprover: null,
  720. puManagerApproverName: null,
  721. processTime: null,
  722. affirmer: null,
  723. tenantId: null,
  724. revision: null,
  725. createBy: null,
  726. createByName: null,
  727. createTime: null,
  728. updateBy: null,
  729. updateByName: null,
  730. updateTime: null,
  731. delFlag: 0,
  732. // 新增字段
  733. model: null,
  734. storageCondition: null,
  735. transportationCondition: null,
  736. }
  737. this.basicForm.puDemandItemList.push(newLine)
  738. // 补单需求状态改变
  739. if (this.basicForm.billType == 'BDXQ') {
  740. this.BDZT = false
  741. } else {
  742. this.BDZT = true
  743. }
  744. },
  745. delLine(index) {
  746. console.log('删除行:', index)
  747. // this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.filter(item => {
  748. // return item.id !== row.id
  749. // })
  750. this.basicForm.puDemandItemList.splice(index,1)
  751. },
  752. back() {
  753. this.$emit('jugislist', true)
  754. let queryParams = {
  755. pageNum: 1,
  756. pageSize: 10
  757. }
  758. this.$emit('refresh', queryParams)
  759. },
  760. // 如果需要回显则调用详情接口
  761. getDetails(row) {
  762. getDemandDetail(row.id).then(res => {
  763. if (res.code === 200) {
  764. // this.basicForm = res.data
  765. let reciveForm = res.data
  766. let params = {...{id: row.id}, ...{pageNum:1, pageSize: 10}}
  767. getDemandSonDetail(params).then(res => {
  768. if (res.code === 200) {
  769. reciveForm.puDemandItemList = res.rows
  770. console.log('reciveForm',reciveForm)
  771. this.basicForm = reciveForm
  772. if(this.basicForm.org) { this.reBackRefer('ORG_PARAM', this.basicForm.org) }
  773. if(this.basicForm.customer) { this.reBackRefer('CUSTOMER_PARAM', this.basicForm.customer) }
  774. if(this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal) }
  775. if(this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
  776. // 详情时将收货仓库id赋值给stordocId
  777. // 如果业务类型为补单需求,则明细内补单供应商编码可以编辑
  778. if(this.basicForm.billType == 'BDXQ') { this.BDZT = false } else { this.BDZT = true }
  779. }
  780. })
  781. }
  782. })
  783. },
  784. handleSelectionChange() {},
  785. // 点击预留单展示
  786. showReserved() {
  787. this.dialog.config = true
  788. },
  789. // 修改是否让页面显示与隐藏的事件
  790. updateReserved (val) {
  791. this.dialog.config = val
  792. },
  793. // 回显参照框
  794. reBackRefer(type, id) {
  795. getRefer({type: type, id: id}).then(res => {
  796. if(type == 'ORG_PARAM') {
  797. this.orgOptions = res.rows
  798. }
  799. if (type == 'CUSTOMER_PARAM') {
  800. this.customerOptions = res.rows
  801. }
  802. if (type == 'CONTACTS_PARAM') {
  803. this.personOptions = res.rows
  804. }
  805. if (type == 'DEPT_PARAM') {
  806. this.deptOptions = res.rows
  807. }
  808. })
  809. },
  810. chooseOrg(type, isPage, title) {
  811. this.referCondition.type = type
  812. this.referCondition.isPage = isPage
  813. this.referCondition.title = title
  814. this.$refs.refer.init(this.referCondition)
  815. },
  816. selectionsToInput(selection) {
  817. if(this.referCondition.type == 'ORG_PARAM') {
  818. this.orgOptions = selection
  819. this.basicForm.org = selection[0].id
  820. this.basicForm.orgName = selection[0].name
  821. }
  822. if(this.referCondition.type == 'CUSTOMER_PARAM') {
  823. this.customerOptions = selection
  824. this.basicForm.customer = selection[0].id
  825. this.basicForm.customerName = selection[0].name
  826. this.basicForm.customerCode = selection[0].code
  827. }
  828. if(this.referCondition.type == 'CONTACTS_PARAM') {
  829. this.personOptions = selection
  830. this.basicForm.demandPersonal = selection[0].code
  831. }
  832. if(this.referCondition.type == 'DEPT_PARAM') {
  833. this.deptOptions = selection
  834. this.basicForm.demandDept = selection[0].id
  835. }
  836. // if(this.referConditionMx.type == 'DEPT_PARAM') {
  837. // this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].code
  838. // this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].name
  839. // }
  840. if(this.referConditionMx.title == '选择收货仓库') {
  841. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id
  842. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = selection[0].name
  843. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = null
  844. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = null
  845. }
  846. if(this.referConditionMx.title == '选择收货货位') {
  847. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = selection[0].id
  848. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = selection[0].name
  849. }
  850. if(this.referConditionMx.title == '选择补单供应商') {
  851. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = selection[0].code
  852. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplierName = selection[0].name
  853. }
  854. if(this.referConditionMx.title == '选择收货地址') {
  855. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName = selection[0].name
  856. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = selection[0].code
  857. this.basicForm.puDemandItemList[this.tableIndex].contacts = selection[0].contactsName
  858. this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = selection[0].contactsPhone
  859. this.basicForm.puDemandItemList[this.tableIndex].address = selection[0].address
  860. }
  861. },
  862. // 明细行选择物料编码带出数据
  863. chooseMaterial(index) {
  864. console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index)
  865. this.tableIndex = index
  866. // 传0只展示同步NC了的物料
  867. this.$refs.materialRefer.init(0)
  868. },
  869. selectMaterial(selection) {
  870. console.log('选中的物料', selection)
  871. // 选择新物料时先清空行内其他信息
  872. this.basicForm.puDemandItemList[this.tableIndex].reservedProportion = null
  873. this.basicForm.puDemandItemList[this.tableIndex].reservedPeriod = null
  874. this.basicForm.puDemandItemList[this.tableIndex].reservedQty = null
  875. this.basicForm.puDemandItemList[this.tableIndex].qty = null
  876. this.basicForm.puDemandItemList[this.tableIndex].deliveryDate = null
  877. this.basicForm.puDemandItemList[this.tableIndex].remark = null
  878. this.basicForm.puDemandItemList[this.tableIndex].resDemandQty = null
  879. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = null
  880. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = null
  881. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = null
  882. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = null
  883. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = null
  884. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplierName = null
  885. this.basicForm.puDemandItemList[this.tableIndex].periodUnit = null
  886. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName = null
  887. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = null
  888. this.basicForm.puDemandItemList[this.tableIndex].contacts = null
  889. this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = null
  890. this.basicForm.puDemandItemList[this.tableIndex].address = null
  891. this.basicForm.puDemandItemList[this.tableIndex].priceType = null
  892. this.basicForm.puDemandItemList[this.tableIndex].lastWarehouseName = null
  893. this.basicForm.puDemandItemList[this.tableIndex].lastWarehouse = null
  894. this.basicForm.puDemandItemList[this.tableIndex].lastAllocation = null
  895. this.basicForm.puDemandItemList[this.tableIndex].lastAllocationName = null
  896. // 通过选择物料查询采购员
  897. queryMan(selection[0].id).then(res => {
  898. if(res.code === 200 && res.rows.length !== 0) {
  899. this.basicForm.puDemandItemList[this.tableIndex].buyer = res.rows[0].buyer
  900. this.basicForm.puDemandItemList[this.tableIndex].buyerName = res.rows[0].buyerName
  901. }
  902. })
  903. this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].businessDepartment
  904. this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].businessDepartmentName
  905. this.basicForm.puDemandItemList[this.tableIndex].materialCode = selection[0].code
  906. this.basicForm.puDemandItemList[this.tableIndex].material = selection[0].id
  907. this.basicForm.puDemandItemList[this.tableIndex].materialName = selection[0].name
  908. this.basicForm.puDemandItemList[this.tableIndex].classifyId = selection[0].classifyId
  909. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyOneName = selection[0].oneClass
  910. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyTwoName = selection[0].twoClass
  911. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyThreeName = selection[0].threeClass
  912. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyFourName = selection[0].fourClass
  913. this.basicForm.puDemandItemList[this.tableIndex].specification = selection[0].specification
  914. this.basicForm.puDemandItemList[this.tableIndex].model = selection[0].model
  915. this.basicForm.puDemandItemList[this.tableIndex].unit = selection[0].unitId
  916. this.basicForm.puDemandItemList[this.tableIndex].unitName = selection[0].unitIdName
  917. this.basicForm.puDemandItemList[this.tableIndex].registrant = selection[0].registrant
  918. this.basicForm.puDemandItemList[this.tableIndex].manufacturerName = selection[0].manufacturerIdName
  919. this.basicForm.puDemandItemList[this.tableIndex].puPeriod = selection[0].deliveryPeriod
  920. this.basicForm.puDemandItemList[this.tableIndex].expiry = selection[0].usefulLife
  921. this.basicForm.puDemandItemList[this.tableIndex].expiryUnit = selection[0].expiryUnitIdName
  922. // this.basicForm.puDemandItemList[this.tableIndex].minPackage = selection[0].usefulLife
  923. this.basicForm.puDemandItemList[this.tableIndex].minPackage = selection[0].minPackQty
  924. this.basicForm.puDemandItemList[this.tableIndex].minOrderQty = selection[0].minOrderQty
  925. this.basicForm.puDemandItemList[this.tableIndex].minBatch = selection[0].minBatchQty
  926. this.basicForm.puDemandItemList[this.tableIndex].safeStock = selection[0].safeStock
  927. this.basicForm.puDemandItemList[this.tableIndex].purOrgName = selection[0].purchasingOrganizationName
  928. this.basicForm.puDemandItemList[this.tableIndex].puOrg = selection[0].purchasingOrganization
  929. // 物料存储条件和运输条件
  930. this.basicForm.puDemandItemList[this.tableIndex].transportationCondition = selection[0].transportationCondition
  931. this.basicForm.puDemandItemList[this.tableIndex].storageCondition = selection[0].storageCondition
  932. },
  933. // 明细行选择业务部门参照带出业务部门数据
  934. chooseDept(index, type, isPage, title) {
  935. this.tableIndex = index
  936. this.referConditionMx.type = type
  937. this.referConditionMx.isPage = isPage
  938. this.referConditionMx.title = title
  939. this.$refs.refer.init(this.referConditionMx)
  940. },
  941. // 明细行选择业务部门参照带出业务部门数据
  942. choosehuoWei(index, type, isPage, title, stordocId) {
  943. this.tableIndex = index
  944. this.referConditionMx.type = type
  945. this.referConditionMx.isPage = isPage
  946. this.referConditionMx.title = title
  947. // 选择收货货位前先选择收货仓库
  948. if(stordocId) {
  949. this.referConditionMx.stordocId = stordocId
  950. this.$refs.refer.init(this.referConditionMx)
  951. } else {
  952. this.$modal.msgWarning("请先选择收货仓库");
  953. }
  954. },
  955. // 明细行清空收货仓库,货位,收货地址档案等
  956. clearHang(index, title) {
  957. if (title == '选择收货仓库') {
  958. this.basicForm.puDemandItemList[index].deliveryWarehouseName = null
  959. this.basicForm.puDemandItemList[index].deliveryWarehouse = null
  960. this.basicForm.puDemandItemList[index].deliveryAllocationName = null
  961. this.basicForm.puDemandItemList[index].deliveryAllocation = null
  962. }
  963. if (title == '选择收货货位') {
  964. this.basicForm.puDemandItemList[index].deliveryAllocationName = null
  965. this.basicForm.puDemandItemList[index].deliveryAllocation = null
  966. }
  967. if (title == '选择收货地址') {
  968. this.basicForm.puDemandItemList[index].deliveryAddressName = null
  969. this.basicForm.puDemandItemList[index].deliveryAddress = null
  970. this.basicForm.puDemandItemList[index].contacts = null
  971. this.basicForm.puDemandItemList[index].contactsPhone = null
  972. this.basicForm.puDemandItemList[index].address = null
  973. }
  974. if (title == '选择补单供应商') {
  975. this.basicForm.puDemandItemList[index].additionalSupplierName = null
  976. this.basicForm.puDemandItemList[index].additionalSupplier = null
  977. }
  978. },
  979. }
  980. }
  981. </script>
  982. <style lang="scss" scoped>
  983. .btn_group {
  984. width: 100%;
  985. margin: 20px 0;
  986. display: flex;
  987. justify-content: center;
  988. }
  989. .btn_grooup {
  990. margin-bottom: 10px;
  991. display: flex;
  992. justify-content: flex-end;
  993. }
  994. .hang {
  995. margin: auto;
  996. }
  997. .hang ::v-deep .el-form-item__content{
  998. margin-left: 0px !important;
  999. }
  1000. </style>