|
@@ -0,0 +1,495 @@
|
|
|
|
+<!--收购管理新增-->
|
|
|
|
+<template>
|
|
|
|
+ <el-container class="container">
|
|
|
|
+ <el-header class="header">
|
|
|
|
+ <img class="head-icon" src="../../../public/img/icons/acquisition6.png" alt="">
|
|
|
|
+ <div class="head-title">鲅鱼圈一号库</div>
|
|
|
|
+ </el-header>
|
|
|
|
+ <el-main>
|
|
|
|
+ <el-form ref="form" label-position="left" :model="form" label-width="120px">
|
|
|
|
+ <el-row class="base-info">
|
|
|
|
+ 基本信息
|
|
|
|
+ </el-row>
|
|
|
|
+ <div class="row1">
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="货名">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="基准水分(%)">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="扣重比">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="row2">
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="干粮水分">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="水分上限">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="grid-content">
|
|
|
|
+ <el-form-item label="销售上限(年/吨)">
|
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-row class="row3">
|
|
|
|
+ <div class="top">
|
|
|
|
+ <div class="title">粮价设置</div>
|
|
|
|
+ <el-button class="btn" @click="newSetPrice">新增</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="content" v-for="(item,index) in priceList" :key="index">
|
|
|
|
+ <div class="top">
|
|
|
|
+ <div class="left">
|
|
|
|
+ <div class="text">基准单价(元/公斤)</div>
|
|
|
|
+ <el-input v-model="priceList.name"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button @click="delSetPrice(item,index)">删除</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="level">
|
|
|
|
+ <el-checkbox-group v-model="checkList" @change="changeLevel">
|
|
|
|
+ <el-checkbox label="一等"></el-checkbox>
|
|
|
|
+ <el-checkbox label="二等"></el-checkbox>
|
|
|
|
+ <el-checkbox label="三等"></el-checkbox>
|
|
|
|
+ <el-checkbox label="等外"></el-checkbox>
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="count">
|
|
|
|
+ <div class="left">
|
|
|
|
+ <div>水分(%)</div>
|
|
|
|
+ <div>降幅(元/0.5%)</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="right">
|
|
|
|
+ <div class="line"></div>
|
|
|
|
+ <div class="jt-style"></div>
|
|
|
|
+
|
|
|
|
+ <div v-for="(item1,index) in item.detailList">
|
|
|
|
+ <div class="item-style">
|
|
|
|
+ <div v-if="item1.type!=4" class="item-style-title">
|
|
|
|
+ <span>{{item1.name}}{{item1.index}}</span>
|
|
|
|
+ <span class="add" @click="add(item,item1,index)" v-if="item1.type!=3">+</span>
|
|
|
|
+ <span class="reduce" @click="reduce(item,item1,index)"
|
|
|
|
+ v-show="item1.type!=1&&item1.type!=2&&item1.type!=3">-</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-show="item1.type!=4">
|
|
|
|
+ <input class="water-price" v-model="form.name" :disabled="item1.isWrite?false:true"></input>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="circle" v-if="item1.type!=4"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="bottom-price">
|
|
|
|
+ <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice"></input>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ </el-main>
|
|
|
|
+ </el-container>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+ // import { getList,} from '@/model/houseSelfCollect/index'
|
|
|
|
+
|
|
|
|
+ export default {
|
|
|
|
+
|
|
|
|
+ components: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ priceList: [{
|
|
|
|
+ unitPrice: '',
|
|
|
|
+ index: 0,
|
|
|
|
+ detailList: [{
|
|
|
|
+ type: 1,
|
|
|
|
+ name: "干粮",
|
|
|
|
+ water: '15',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 2,
|
|
|
|
+ name: "基准",
|
|
|
|
+ water: '30',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 3,
|
|
|
|
+ name: "上限",
|
|
|
|
+ water: '40',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ }],
|
|
|
|
+ checkList: [],
|
|
|
|
+ form: {
|
|
|
|
+ name: "姓名"
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ index: 0
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {},
|
|
|
|
+ methods: {
|
|
|
|
+ add(item, item1, index) {
|
|
|
|
+ debugger
|
|
|
|
+ // let _data = this.detailList;
|
|
|
|
+ if (item.index > 2) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '最多插入3个分界值',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ item.index++
|
|
|
|
+ item.detailList.splice(index + 1, 0, {
|
|
|
|
+ name: "分界",
|
|
|
|
+ water: '30',
|
|
|
|
+ type: 5,
|
|
|
|
+ index: 1,
|
|
|
|
+ isWrite: true
|
|
|
|
+ // jfprice: "0.03"
|
|
|
|
+ });
|
|
|
|
+ item.detailList.splice(index + 1, 0, {
|
|
|
|
+ jfprice: "0.03",
|
|
|
|
+ type: 4
|
|
|
|
+ });
|
|
|
|
+ this.makeSpliceIndex(item, item1, index)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ reduce(item, item1, index) {
|
|
|
|
+ item.index--
|
|
|
|
+ item.detailList.splice(index, 2);
|
|
|
|
+ console.log(item, index)
|
|
|
|
+ },
|
|
|
|
+ makeSpliceIndex(item, item1) {
|
|
|
|
+ let _index = 0
|
|
|
|
+ for (let j = 0; j < item.detailList.length; j++) {
|
|
|
|
+ if (item.detailList[j].type == 5) {
|
|
|
|
+ _index++
|
|
|
|
+ item.detailList[j].index = _index;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ changeLevel() {
|
|
|
|
+ console.log(this.checkList)
|
|
|
|
+ },
|
|
|
|
+ newSetPrice() {
|
|
|
|
+ let _newObj = {
|
|
|
|
+ unitPrice: '',
|
|
|
|
+ index: 0,
|
|
|
|
+ detailList: [{
|
|
|
|
+ type: 1,
|
|
|
|
+ name: "干粮",
|
|
|
|
+ water: '15',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 2,
|
|
|
|
+ name: "基准",
|
|
|
|
+ water: '30',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 3,
|
|
|
|
+ name: "上限",
|
|
|
|
+ water: '40',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ this.priceList.push(_newObj)
|
|
|
|
+ },
|
|
|
|
+ delSetPrice() {
|
|
|
|
+ let _newObj = {
|
|
|
|
+ unitPrice: '',
|
|
|
|
+ detailList: [{
|
|
|
|
+ type: 1,
|
|
|
|
+ name: "干粮",
|
|
|
|
+ water: '15',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 2,
|
|
|
|
+ name: "基准",
|
|
|
|
+ water: '30',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 4,
|
|
|
|
+ jfprice: "0.03"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: 3,
|
|
|
|
+ name: "上限",
|
|
|
|
+ water: '40',
|
|
|
|
+ isWrite: false
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ // this.detailList.push(_newObj)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss">
|
|
|
|
+ .el-checkbox__input.is-checked .el-checkbox__inner,
|
|
|
|
+ .el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
|
|
|
+ background-color: #5878E8;
|
|
|
|
+ border-color: #5878E8;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-checkbox__input.is-checked+.el-checkbox__label {
|
|
|
|
+ color: #5878E8;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-checkbox.is-bordered.is-checked {
|
|
|
|
+ border-color: #5878E8;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-checkbox__input.is-focus .el-checkbox__inner {
|
|
|
|
+ border-color: #5878E8;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .basic-container {
|
|
|
|
+ overflow: auto;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .container {
|
|
|
|
+ padding: 20px
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.el-header {
|
|
|
|
+ padding: 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .header {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-bottom: 1px solid #E9ECF7;
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
+ width: 80%;
|
|
|
|
+
|
|
|
|
+ .head-icon {
|
|
|
|
+ width: 19px;
|
|
|
|
+ height: 19px;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .head-title {
|
|
|
|
+ font-size: 21px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #323233;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .row1,
|
|
|
|
+ .row2 {
|
|
|
|
+ // background: red;
|
|
|
|
+ display: flex;
|
|
|
|
+ // margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .row3 {
|
|
|
|
+ .top {
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ .btn {
|
|
|
|
+ width: 52px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ background: #5878E8;
|
|
|
|
+ color: white;
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ // text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-left: 4px solid #5473E8;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #323233;
|
|
|
|
+ padding-left: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .base-info {
|
|
|
|
+ border-left: 4px solid #5473E8;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #323233;
|
|
|
|
+ padding-left: 10px;
|
|
|
|
+ margin: 24px 0 10px 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .grid-content {
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .content {
|
|
|
|
+ border: 1px solid #D8DCE6;
|
|
|
|
+ margin: 20px 0;
|
|
|
|
+ padding: 15px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+
|
|
|
|
+ .top {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+
|
|
|
|
+ .left {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .text {
|
|
|
|
+ width: 220px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #8890B1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .level {
|
|
|
|
+ margin: 10px 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .count {
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-bottom: 15px;
|
|
|
|
+
|
|
|
|
+ .left {
|
|
|
|
+ width: 10%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: flex-end;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .right {
|
|
|
|
+ width: 85%;
|
|
|
|
+ position: relative;
|
|
|
|
+ padding-bottom: 50px;
|
|
|
|
+
|
|
|
|
+ .water-price {
|
|
|
|
+ width: 60px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ background: #F6F7FB;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ border: 1px solid #D8DCE6;
|
|
|
|
+ text-align: center
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .add,
|
|
|
|
+ .reduce {
|
|
|
|
+ width: 16px;
|
|
|
|
+ height: 16px;
|
|
|
|
+ background: #5473E8;
|
|
|
|
+ border-radius: 2px;
|
|
|
|
+ color: white;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .reduce {
|
|
|
|
+ background: white;
|
|
|
|
+ color: #D5D8DE;
|
|
|
|
+ border: 1px solid #D5D8DE;
|
|
|
|
+ display: inline-flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .item-style {
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ .item-style-title {
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .line {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 72px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 5px;
|
|
|
|
+ background: linear-gradient(39deg, #E6EEFF 0%, #91B0F5 42%, #5878E8 100%);
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .bottom-price {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: -10px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .jt-style {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 64px;
|
|
|
|
+ width: 0px;
|
|
|
|
+ height: 0px;
|
|
|
|
+ right: -15px;
|
|
|
|
+ border-left: 15px solid #5473E8;
|
|
|
|
+ border-top: 10px solid transparent;
|
|
|
|
+ border-bottom: 10px solid transparent;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+
|
|
|
|
+ .circle {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 2;
|
|
|
|
+ width: 15px;
|
|
|
|
+ height: 15px;
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
+ border: 3px solid #5473E8;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ right: 40%;
|
|
|
|
+ bottom: -22px
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|