耗材样式
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
供应商
|
||||
<text style="color: red;">*</text> 供应商
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
||||
@@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
联系电话
|
||||
<text style="color: red;">*</text> 联系电话
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
||||
@@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
地址
|
||||
<text style="color: red;">*</text> 地址
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
||||
@@ -39,6 +39,8 @@
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -47,7 +49,8 @@
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
@@ -59,10 +62,17 @@
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
},
|
||||
})
|
||||
|
||||
const currentInstance = getCurrentInstance()
|
||||
function sumbit() {
|
||||
if(!datas.form.purveyorName||!datas.form.purveyorTelephone||!datas.form.address){
|
||||
currentInstance.ctx.$refs.uToastRef.show({
|
||||
message: "请填写必填项",
|
||||
type: 'default',
|
||||
})
|
||||
return
|
||||
}
|
||||
tbShopPurveyorpost(datas.form).then(res => {
|
||||
go.to('PAGES_SUPPLIER')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user