Commit 372c5431 authored by Damon's avatar Damon

feat: 完工页-不用物料

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