购物车历史订单增加,代码优化
This commit is contained in:
@@ -58,13 +58,11 @@
|
||||
<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>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, onMounted, getCurrentInstance } from 'vue';
|
||||
import { ref, computed, reactive, onMounted } from 'vue';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -73,7 +71,6 @@
|
||||
import { stockOut } from '@/http/api/cons.js';
|
||||
|
||||
let showStatus = ref(false)
|
||||
const refs = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
show: false,
|
||||
// 供应商列表
|
||||
@@ -144,17 +141,11 @@
|
||||
let sumbit = uni.$utils.debounce(() => {
|
||||
|
||||
if (!datas.form.bodyList.inOutNumber) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
uni.$utils.showToast("请输入必填项")
|
||||
return
|
||||
}
|
||||
if (!datas.form.bodyList.purchasePrice) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
uni.$utils.showToast("请输入必填项")
|
||||
return
|
||||
}
|
||||
datas.form.bodyList.conId = datas.item.id
|
||||
|
||||
Reference in New Issue
Block a user