placeOrder.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. <style lang="scss" scoped>
  2. .placeOrder{
  3. ul,li{
  4. margin: 0;
  5. padding: 0;
  6. }
  7. width: 100%;
  8. .topBody{
  9. width: 100%;
  10. height: 146px;
  11. background: #FFFFFF;
  12. margin-bottom: 24px;
  13. padding: 20px;
  14. box-sizing: border-box;
  15. .breadcrumb{
  16. height: 22px;
  17. font-size: 12px;
  18. font-family: PingFangSC-Regular, PingFang SC;
  19. font-weight: 400;
  20. color: #000000;
  21. line-height: 22px;
  22. }
  23. .bottom{
  24. display: flex;
  25. position: relative;
  26. // padding: 20px;
  27. .touxiang{
  28. width: 72px;
  29. height: 72px;
  30. }
  31. .tip{
  32. .greet{
  33. width: 300px;
  34. height: 28px;
  35. font-size: 20px;
  36. font-family: PingFangSC-Medium, PingFang SC;
  37. font-weight: 500;
  38. color: rgba(0, 0, 0, 0.85);
  39. line-height: 28px;
  40. }
  41. .descPosition{
  42. height: 22px;
  43. font-size: 14px;
  44. font-family: PingFangSC-Regular, PingFang SC;
  45. font-weight: 400;
  46. color: rgba(0, 0, 0, 0.45);
  47. line-height: 22px;
  48. }
  49. }
  50. .mybtn{
  51. position: absolute;
  52. // top: 50%;
  53. // margin-left: -18px;
  54. right: 0;
  55. }
  56. }
  57. }
  58. .section{
  59. background: white;
  60. .sectionBody{
  61. // background: white;
  62. width:960px;
  63. margin: 0 auto ;
  64. margin-top: 20px;
  65. ul,
  66. li {
  67. margin: 0;
  68. padding: 0;
  69. }
  70. .moduler {
  71. background: #fff;
  72. margin-bottom: 16px;
  73. position: relative;
  74. padding: 32px 24px 48px 32px;
  75. // border-radius: 4px;
  76. // box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
  77. .moduler-title {
  78. display: flex;
  79. align-items: center;
  80. font-size: 22px;
  81. margin-bottom: 20px;
  82. }
  83. .row-item {
  84. display: flex;
  85. justify-content: flex-start;
  86. align-items: center;
  87. margin-bottom: 32px;
  88. }
  89. .row-item:last-of-type {
  90. margin-bottom: 0;
  91. }
  92. .row-item .hint-item {
  93. width: 24px;
  94. min-width: 24px;
  95. align-self: flex-start;
  96. line-height: 20px;
  97. height: 20px;
  98. margin-top: 9px;
  99. }
  100. .row-item .label-item {
  101. position: relative;
  102. align-items: flex-start;
  103. align-self: flex-start;
  104. line-height: 20px;
  105. height: 20px;
  106. margin-top: 10px;
  107. width: 80px;
  108. min-width: 80px;
  109. .text-item {
  110. font-size: 14px;
  111. width: 60px;
  112. }
  113. }
  114. .row-item .required-item {
  115. width: 4px;
  116. height: 4px;
  117. border-radius: 2px;
  118. background: #f45858;
  119. position: absolute;
  120. right: 10px;
  121. top: 50%;
  122. transform: translateY(-50%);
  123. }
  124. .row-item .input-item {
  125. min-width: 480px;
  126. position: relative;
  127. // height: 35px;
  128. .tip {
  129. font-size: 12px;
  130. color: tomato;
  131. }
  132. }
  133. .adName{
  134. display: flex;
  135. .nameList{
  136. width: 90%;
  137. }
  138. .item{
  139. display: inline-block;
  140. width: 30%;
  141. margin-left: 15px;
  142. margin-bottom: 10px;
  143. }
  144. }
  145. .opt {
  146. text-align: right;
  147. }
  148. }
  149. }
  150. }
  151. }
  152. </style>
  153. <style lang="less">
  154. .placeOrder{
  155. .ant-timeline-item-head{
  156. background: rgb(240,242,245);
  157. }
  158. .ant-form-item {
  159. margin-bottom: 0px;
  160. }
  161. .ant-radio-button-wrapper {
  162. min-width: 80px;
  163. text-align: center;
  164. }
  165. }
  166. </style>
  167. <template>
  168. <div class="placeOrder">
  169. <div class="topBody">
  170. <p class="breadcrumb">
  171. <a-breadcrumb style="display:block;width:100%">
  172. <a-breadcrumb-item><router-link to="/workBench">工作台</router-link></a-breadcrumb-item>
  173. <a-breadcrumb-item>素材下单</a-breadcrumb-item>
  174. </a-breadcrumb>
  175. </p>
  176. <div class="bottom">
  177. <div class='tip'>
  178. <p class="greet">素材下单</p>
  179. <p class="descPosition">
  180. <span>在此下单给设计组长,下单前请与设计组长沟通日均产出素材量。</span>
  181. </p>
  182. </div>
  183. </div>
  184. </div>
  185. <div class="section">
  186. <div class="sectionBody">
  187. <a-form-model
  188. ref="ruleForm"
  189. :model="form"
  190. :rules="rules"
  191. >
  192. <div class="moduler">
  193. <!-- 名称 -->
  194. <div class="row-item" >
  195. <div class="hint-item"></div>
  196. <div class="label-item">
  197. <div class="text-item">订单标题</div>
  198. <div class="required-item"></div>
  199. </div>
  200. <div class="input-item">
  201. <a-form-model-item ref="orderTitle" prop="orderTitle">
  202. <a-input v-model="form.orderTitle" />
  203. </a-form-model-item>
  204. </div>
  205. </div>
  206. <div class="row-item" >
  207. <div class="hint-item"></div>
  208. <div class="label-item">
  209. <div class="text-item">设计组长</div>
  210. <div class="required-item"></div>
  211. </div>
  212. <div class="input-item">
  213. <a-form-model-item ref="design" prop="design">
  214. <a-select style="width: 300px" v-model="form.design" mode="multiple" placeholder="请选择设计组长">
  215. <a-select-option v-for="item in designLeaderList" :key="item.id" :value='item.value'>
  216. {{item.title}}
  217. </a-select-option>
  218. </a-select>
  219. </a-form-model-item>
  220. </div>
  221. </div>
  222. <div class="row-item" >
  223. <div class="hint-item"></div>
  224. <div class="label-item">
  225. <div class="text-item">关联项目</div>
  226. <div class="required-item"></div>
  227. </div>
  228. <div class="input-item">
  229. <a-form-model-item ref="project" prop="project">
  230. <a-select style="width: 300px" v-model="form.project" mode="multiple" placeholder="请选择关联项目">
  231. <a-select-option v-for="item in projectList" :key="item.id" :value='item.value'>
  232. {{item.title}}
  233. </a-select-option>
  234. </a-select>
  235. </a-form-model-item>
  236. </div>
  237. </div>
  238. <div class="row-item" >
  239. <div class="hint-item"></div>
  240. <div class="label-item">
  241. <div class="text-item">投放系统</div>
  242. <div class="required-item"></div>
  243. </div>
  244. <div class="input-item">
  245. <a-form-model-item ref="sysName" prop="sysName">
  246. <a-radio-group v-model="form.sysName" @change="sysNameChange">
  247. <a-radio-button :value="3">不限</a-radio-button>
  248. <a-radio-button :value="1">IOS</a-radio-button>
  249. <a-radio-button :value="2">安卓</a-radio-button>
  250. </a-radio-group>
  251. </a-form-model-item>
  252. </div>
  253. </div>
  254. <div class="row-item" v-if="form.sysName==2">
  255. <div class="hint-item"></div>
  256. <div class="label-item">
  257. <div class="text-item">APK链接</div>
  258. <div class="required-item"></div>
  259. </div>
  260. <div class="input-item">
  261. <a-form-model-item ref="sysPackage" prop="sysPackage">
  262. <a-input
  263. v-model="form.sysPackage"
  264. @blur="
  265. () => {
  266. $refs.sysPackage.onFieldBlur();
  267. }
  268. "
  269. />
  270. </a-form-model-item>
  271. </div>
  272. </div>
  273. <div class="row-item" >
  274. <div class="hint-item"></div>
  275. <div class="label-item">
  276. <div class="text-item">订单周期</div>
  277. <div class="required-item"></div>
  278. </div>
  279. <div class="input-item">
  280. <a-form-model-item ref="dataValue" prop="dataValue">
  281. <a-range-picker v-model="form.dataValue" />
  282. </a-form-model-item>
  283. </div>
  284. </div>
  285. <div class="row-item" >
  286. <div class="hint-item"></div>
  287. <div class="label-item">
  288. <div class="text-item">素材总量</div>
  289. <div class="required-item"></div>
  290. </div>
  291. <div class="input-item">
  292. <a-form-model-item ref="materialAmount" prop="materialAmount">
  293. <a-input-number :min="1" :max="500" @change="materialAmountChange" v-model="form.materialAmount" />
  294. </a-form-model-item>
  295. </div>
  296. </div>
  297. <div class="row-item" >
  298. <div class="hint-item"></div>
  299. <div class="label-item">
  300. <div class="text-item">日均产量</div>
  301. <div class="required-item"></div>
  302. </div>
  303. <div class="input-item">
  304. <a-form-model-item ref="materialAmountDay" prop="materialAmountDay">
  305. <a-input-number :min="1" :max="500" @change="materialAmountDayChange" v-model="form.materialAmountDay" />
  306. </a-form-model-item>
  307. </div>
  308. </div>
  309. <div class="row-item" >
  310. <div class="hint-item"></div>
  311. <div class="label-item">
  312. <div class="text-item">素材类型</div>
  313. <div class="required-item"></div>
  314. </div>
  315. <div class="input-item">
  316. <a-form-model-item ref="materialType" prop="materialType">
  317. <a-radio-group v-model="form.materialType" @change="materialTypeChange">
  318. <a-radio-button value="NONE">不限</a-radio-button>
  319. <a-radio-button value="REALPEOPLE">真人</a-radio-button>
  320. <a-radio-button value="CLIP">剪辑</a-radio-button>
  321. <a-radio-button value="COMBINATION">组合</a-radio-button>
  322. </a-radio-group>
  323. </a-form-model-item>
  324. </div>
  325. </div>
  326. <div class="row-item" v-if="form.materialType=='COMBINATION'">
  327. <div class="hint-item"></div>
  328. <div class="label-item">
  329. <div class="text-item">真人数量</div>
  330. <div class="required-item"></div>
  331. </div>
  332. <div class="input-item">
  333. <a-form-model-item ref="realAmount" prop="realAmount">
  334. <a-input-number :min="1" :max="500" @change="realAmountChange" v-model="form.realAmount" />
  335. </a-form-model-item>
  336. </div>
  337. </div>
  338. <div class="row-item" v-if="form.materialType=='COMBINATION'">
  339. <div class="hint-item"></div>
  340. <div class="label-item">
  341. <div class="text-item">剪辑数量</div>
  342. <div class="required-item"></div>
  343. </div>
  344. <div class="input-item">
  345. <a-form-model-item ref="cutAmount" prop="cutAmount">
  346. <a-input-number :min="1" :max="500" @change="materialAmountDayChange" v-model="form.cutAmount" />
  347. </a-form-model-item>
  348. </div>
  349. </div>
  350. <div class="row-item" >
  351. <div class="hint-item"></div>
  352. <div class="label-item">
  353. <div class="text-item">订单备注</div>
  354. <div class="required-item"></div>
  355. </div>
  356. <div class="input-item">
  357. <a-form-model-item ref="orderRemark" prop="orderRemark">
  358. <a-textarea
  359. v-model="form.orderRemark"
  360. placeholder="请输入订单备注"
  361. :auto-size="{ minRows: 3, }"
  362. />
  363. </a-form-model-item>
  364. </div>
  365. </div>
  366. <div class="row-item" >
  367. <div class="hint-item"></div>
  368. <div class="label-item">
  369. <div class="text-item">附件</div>
  370. <div class="required-item"></div>
  371. </div>
  372. <div class="input-item">
  373. <a-form-model-item ref="orderRemark" prop="orderRemark">
  374. <a-upload
  375. action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
  376. :default-file-list="defaultFileList"
  377. >
  378. <a-button> <a-icon type="upload" /> 上传附件 </a-button>
  379. </a-upload>
  380. </a-form-model-item>
  381. </div>
  382. </div>
  383. </div>
  384. <div class="moduler">
  385. <!-- <div class="moduler-title">计划名称</div> -->
  386. <div class="opt">
  387. <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
  388. <a-button type="primary" style="margin-right:15px" @click="saveHandler" :loading="saveLoading">保存</a-button>
  389. </div>
  390. </div>
  391. </a-form-model>
  392. </div>
  393. </div>
  394. </div>
  395. </template>
  396. <script>
  397. import moment from 'moment';
  398. import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
  399. export default {
  400. data() {
  401. return {
  402. defaultFileList:[],
  403. saveLoading:false,
  404. form: {
  405. orderTitle: '',
  406. design:undefined,
  407. project:undefined,
  408. sysName:3,
  409. sysPackage:'',
  410. dataValue:[],
  411. materialAmount:undefined,
  412. materialAmountDay:undefined,
  413. materialType:'NONE',
  414. realAmount:undefined,
  415. cutAmount:undefined,
  416. orderRemark:'',
  417. },
  418. rules: {
  419. orderTitle: [
  420. { required: true, message: '请填写订单名称', trigger: 'blur' },
  421. { min: 2, message: '长度不得小于2', trigger: 'blur' },
  422. ],
  423. sysPackage: [
  424. { required: true, message: '请输入APK链接', trigger: 'blur' },
  425. { min: 2, message: '长度不得小于2', trigger: 'blur' },
  426. ],
  427. dataValue: [{ required: true, message: '请选择订单周期', trigger: 'change' }],
  428. applyRange: [{ required: true, message: '请选择具体应用范围', trigger: 'change' }],
  429. applyAccount: [{required: true, message: '请选择具体应用范围', trigger: 'change' }],
  430. specificMoment: [{required: true, message: '请选择具体时刻', trigger: 'change' }],
  431. },
  432. // 操作记录
  433. designLeaderList:[],
  434. projectList:[],
  435. // 本周项目燃尽图
  436. burnDownChart:[],
  437. // 分页参数
  438. totalPage:0,
  439. currentPage:1,
  440. }
  441. },
  442. methods: {
  443. // 附件上传的方法
  444. handleChange({ file, fileList }) {
  445. if (file.status !== 'uploading') {
  446. console.log(file, fileList);
  447. }
  448. },
  449. // form-modal 自带方法
  450. onSubmit() {
  451. this.$refs.ruleForm.validate(valid => {
  452. if (valid) {
  453. console.log('submit!',valid);
  454. } else {
  455. console.log('error submit!!');
  456. return false;
  457. }
  458. });
  459. },
  460. resetForm() {
  461. this.$refs.ruleForm.resetFields();
  462. },
  463. // 分页页码改变
  464. pageChange(page, pageSize){
  465. },
  466. sysNameChange(val){
  467. console.log(val);
  468. this.form.sysPackage='';
  469. },
  470. materialAmountChange(e){
  471. console.log(e.target.value)
  472. },
  473. materialAmountDayChange(){
  474. },
  475. materialTypeChange(val){
  476. },
  477. goBack() {
  478. this.$router.replace('/autoRules')
  479. this.$bus.$emit('remove', '/newBlankRule')
  480. },
  481. saveHandler(){
  482. this.$refs.ruleForm.validate(valid=> {
  483. if (valid) {
  484. this.form.rulesList=this.rulesList;
  485. console.log(valid,this.form);
  486. } else {
  487. console.log('error submit!!');
  488. return false;
  489. }
  490. });
  491. },
  492. },
  493. }
  494. </script>