| | |
| | | <div class="tl_list_item_go"> |
| | | <span |
| | | :style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '请选择'}}</span> |
| | | <u-icon name="arrow-right" color="#999999" size="20"></u-icon> |
| | | <van-icon name="arrow" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-if="item.type === ''"> |
| | | <div class="tl_list_item_label">属性值1</div> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input type="text" v-model="item.num" placeholder="请输入" /> |
| | | </div> |
| | |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <u-radio-group v-model="item.num" placement="row" @change="radioSelect"> |
| | | <u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :name="item1" |
| | | :label="item1"> |
| | | <u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :name="item1" :label="item1"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | <!-- <van-radio-group v-model="item.num" direction="horizontal"> |
| | | <van-radio :name="item1" checked-color="#4275FC" v-for="(item1, i) in item.data" :key="i"> |
| | | {{item1}} |
| | | </van-radio> |
| | | </van-radio-group> --> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 1"> |
| | |
| | | </u-checkbox-group> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 2"> |
| | | <div class="tl_list_item" v-else-if="item.type === 2 || item.type === 3"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input type="text" v-model="item.num" :placeholder="item.tips" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 3"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input v-model="item.num" type="digit" :placeholder="item.tips" /> |
| | | <!-- <u--input v-model="item.num" :placeholder="item.tips" type="digit" |
| | | border="surround"></u--input> --> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span> |
| | | <u-icon name="arrow-right" color="#999999" size="20"></u-icon> |
| | | <u-icon name="arrow" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | <!-- <van-swipe-cell v-for="(item, index) in formList" :key="index"> |
| | | <div class="tl_list"> |
| | | <div class="tl_list_item" @click="open(index)"> |
| | | <div class="tl_list_item_label">生产属性</div> |
| | | <div class="tl_list_item_go"> |
| | | <span |
| | | :style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '请选择'}}</span> |
| | | <van-icon name="arrow" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-if="item.type === ''"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input type="text" v-model="item.num" placeholder="请输入" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 0"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <u-radio-group v-model="item.num" placement="row"> |
| | | <u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :label="item1"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 1"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <u-checkbox-group v-model="item.num" placement="row"> |
| | | <u-checkbox v-for="(item1, i) in item.data" :key="i" :label="item1" :name="item1"> |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 2"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input type="text" v-model="item.num" :placeholder="item.tips" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" v-else-if="item.type === 3"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <input type="text" v-model="item.num" :placeholder="item.tips" /> |
| | | </div> |
| | | </div> |
| | | <div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4"> |
| | | <div class="tl_list_item_label">属性值</div> |
| | | <div class="tl_list_item_go"> |
| | | <span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span> |
| | | <u-icon name="arrow" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template #right> |
| | | <van-button square style="height: 100%;" type="danger" text="删除" @click="dele(index)" /> |
| | | </template> |
| | | </van-swipe-cell> --> |
| | | |
| | | <div class="tl_zw"></div> |
| | | <div class="tl_footer"> |
| | |
| | | </div> |
| | | <u-picker :show="show" :columns="[gzqjData]" title="选择生产属性" @confirm="gzqjConfirm" @cancel="show=false"> |
| | | </u-picker> |
| | | <u-datetime-picker :show="timer" v-model="value1" @cancel="timer=false" @confirm="onConfirm" mode="datetime"> |
| | | </u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | options1: [{ |
| | | text: '删除', |
| | | style: { |
| | | backgroundColor: '#f00', |
| | | } |
| | | text: '删除' |
| | | }], |
| | | value1: Number(new Date()), |
| | | show: false, |
| | | timer: false, |
| | | index: '', |
| | | workOrderId: '', |
| | | info: {}, |
| | |
| | | this.index = index |
| | | this.show = true |
| | | }, |
| | | // 打开日期插件 |
| | | openTimer(index) { |
| | | this.index = index |
| | | this.timer = true |
| | | }, |
| | | gzqjConfirm({ |
| | | value |
| | | }) { |
| | |
| | | } |
| | | this.formList.splice(index, 1) |
| | | }, |
| | | onConfirm(value) { |
| | | console.log(value); |
| | | this.formList.forEach((item, index) => { |
| | | if (this.index === index) { |
| | | item.num = setTimeO(new Date(value.value), '-') |
| | | } |
| | | }) |
| | | this.timer = false; |
| | | }, |
| | | radioSelect(v) { |
| | | console.log(v); |
| | | }, |
| | | submit() { |
| | | let isOpen = true |
| | | let attrList = [] |
| | | |
| | | |
| | | this.formList.forEach(item => { |
| | | console.log('-------', item); |
| | | if (item.type === 1) { |
| | |
| | | uni.$u.toast('请将信息填写完整') |
| | | return |
| | | } |
| | | |
| | | |
| | | createDJ({ |
| | | attrList: attrList, |
| | | id: this.workOrderId |
| | |
| | | flex-direction: column; |
| | | background: white; |
| | | padding: 0 30rpx; |
| | | // margin-bottom: 20rpx; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .tl_list_item { |
| | | min-height: 98rpx; |
| | |
| | | .tl_list_item_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | flex-shrink: 1; |
| | | color: #222222; |
| | | } |
| | | |
| | | .tl_list_item_go { |
| | | display: flex; |
| | | align-items: center; |
| | | flex: 1; |
| | | justify-content: flex-end; |
| | | |
| | | input { |
| | | text-align: right; |
| | |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /deep/ .u-checkbox-group { |
| | | flex-wrap: wrap; |
| | | max-width: 100%; |
| | | } |
| | | |
| | | /deep/ .u-radio-group { |
| | | flex-wrap: wrap; |
| | | max-width: 100%; |
| | | } |
| | | </style> |