Commit 372c5431 authored by Damon's avatar Damon

feat: 完工页-不用物料

parent 201f9695
......@@ -19,6 +19,7 @@
</view>
<view class="u-flex bottom-right">
<button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button>
<button v-if="cancelStatus" :class="['btn', btnNotActive]" @click="cancel">不用物料</button>
</view>
</view>
</template>
......@@ -42,6 +43,12 @@
type: Boolean,
default() {
return false
}
},
cancelStatus: { // 是否显示取消按钮
type: Boolean,
default() {
return false
}
},
partNum: { // 物料数量
......@@ -64,7 +71,7 @@
},
customStyle: {
type: String,
default: 'background-color: #FFFFFF;padding: 0 30rpx;'
default: 'background-color: #FFFFFF;'
},
},
......@@ -79,6 +86,9 @@
},
btnActive() {
return this.btnStatus ? 'btn-active' : ''
},
btnNotActive() {
return this.btnStatus ? '' : 'btn-active'
}
},
watch: {
......@@ -95,6 +105,9 @@
},
submit() {
if (this.btnStatus) this.$emit('submit')
},
cancel() {
if (!this.btnStatus) this.$emit('cancel')
}
}
}
......@@ -128,7 +141,7 @@
.bottom-center {
flex: 1;
align-items: flex-start;
margin: 0 20rpx;
margin-right: 20rpx;
.center-list {
&:nth-of-type(1) {
color: #666;
......@@ -165,7 +178,8 @@
}
}
.bottom-right {
width: 360rpx;
flex: 1;
// width: 360rpx;
// margin-right: 20rpx;
.btn {
width: 100%;
......@@ -176,6 +190,7 @@
text-align: center;
background: #D1D4D4;
color: #fff;
margin: 0 10rpx;
&::after {
content: '';
height: 0;
......
......@@ -27,9 +27,12 @@
:partNum="partNum"
:num="num"
:btnStatus="partNum > 0"
submitTxt="用物料"
:allChecked="allChecked"
:cancelStatus="true"
@select="allSelect"
@submit="submit"
@cancel="cancel"
/>
</view>
</view>
......@@ -114,6 +117,9 @@
prevPage.$vm.$refs['fileChildParts'][0].valChange(lists)
this.$u.route({ type: 'back' })
},
cancel() {
this.$u.route({ type: 'back' })
},
qnFile(src) {
return process.uniEnv.qn_base_url + src
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment