Commit 9c547acb by liuliufashi

update

parent 12a9b1e7
...@@ -330,7 +330,8 @@ const onSubmit = () => { ...@@ -330,7 +330,8 @@ const onSubmit = () => {
parent: 1, parent: 1,
markingprice:fromData.markingprice*100, markingprice:fromData.markingprice*100,
price:fromData.markingprice*100, price:fromData.markingprice*100,
picurl:fromData.picurl picurl:fromData.picurl,
free:value.value
} }
const data: any = await onCreateGoods(JSON.stringify(prarms)) const data: any = await onCreateGoods(JSON.stringify(prarms))
if (data.state === 1) { if (data.state === 1) {
......
...@@ -126,6 +126,8 @@ ...@@ -126,6 +126,8 @@
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">划线价</div> <div style="margin-right:20px">划线价</div>
<a-input-number style="width: 200px" :min="0" string-mode <a-input-number style="width: 200px" :min="0" string-mode
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
v-model:value="modelRef.markingprice" /> v-model:value="modelRef.markingprice" />
</div> </div>
</a-form-item> </a-form-item>
...@@ -134,6 +136,8 @@ ...@@ -134,6 +136,8 @@
<div style="display:flex;"> <div style="display:flex;">
<div style="margin-right:20px">售卖价</div> <div style="margin-right:20px">售卖价</div>
<a-input-number style="width: 200px" :min="0" string-mode <a-input-number style="width: 200px" :min="0" string-mode
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
v-model:value="modelRef.price" /> v-model:value="modelRef.price" />
</div> </div>
</a-form-item> </a-form-item>
...@@ -311,8 +315,10 @@ const onBack = async (e: Number) => { ...@@ -311,8 +315,10 @@ const onBack = async (e: Number) => {
const onEdit = (e: any) => { const onEdit = (e: any) => {
visible.value = !visible.value; visible.value = !visible.value;
modelRef.value = e modelRef.value = e
modelRef.value.sellingmodel = modelRef.value.price? '1':'0' modelRef.value.sellingmodel = e.price? '1':'0'
fileList.value[0].url = modelRef.value.picurl modelRef.value.price = e.price/100
modelRef.value.markingprice = e.markingprice/100
fileList.value[0].url = e.value.picurl
}; };
const { resetFields, validate, validateInfos } = useForm( const { resetFields, validate, validateInfos } = useForm(
modelRef, modelRef,
......
...@@ -189,6 +189,7 @@ const onSubmit = () => { ...@@ -189,6 +189,7 @@ const onSubmit = () => {
goodspayditch:goodspayditch.value, goodspayditch:goodspayditch.value,
payment:formState.paymentmodel == '1'?price.value*100:priceSet.value*100, payment:formState.paymentmodel == '1'?price.value*100:priceSet.value*100,
uid, uid,
remark:toRaw(formState).remark
} }
const data:any = await onCreateGoodsPay(prarms) const data:any = await onCreateGoodsPay(prarms)
if(data.state === 1){ if(data.state === 1){
......
...@@ -75,13 +75,13 @@ ...@@ -75,13 +75,13 @@
<a-radio-group v-model:value="formState.paymentmodel" name="radioGroup" class="pay"> <a-radio-group v-model:value="formState.paymentmodel" name="radioGroup" class="pay">
<div style="display: flex;height: 35px;"> <div style="display: flex;height: 35px;">
<a-radio :value="0" style="width:150px;">商品默认金额</a-radio> <a-radio :value="0" style="width:150px;">商品默认金额</a-radio>
<a-input-number style="width:200px;height: 35px;" v-model:value="formState.payment" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" <a-input-number style="width:200px;height: 35px;" v-model:value="formState.markingprice" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')" :disabled="true"/> :parser="value => value.replace(/\$\s?|(,*)/g, '')" :disabled="true"/>
<div style="width:50px;"></div> <div style="width:50px;"></div>
</div> </div>
<div style="display: flex;height: 35px;margin-top: 20px;"> <div style="display: flex;height: 35px;margin-top: 20px;">
<a-radio :value="1" style="width:150px;">自定义金额</a-radio> <a-radio :value="1" style="width:150px;">自定义金额</a-radio>
<a-input-number style="width:200px;height: 35px;" v-model:value="formState.paymentmodel" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" <a-input-number style="width:200px;height: 35px;" v-model:value="formState.payment" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"/> :parser="value => value.replace(/\$\s?|(,*)/g, '')"/>
<div style="width:50px;"></div> <div style="width:50px;"></div>
</div> </div>
...@@ -240,10 +240,11 @@ const handleOk =async(e: MouseEvent) => { ...@@ -240,10 +240,11 @@ const handleOk =async(e: MouseEvent) => {
}; };
const onEdit = (e: any) => { const onEdit = (e: any) => {
formState.value =e formState.value =e
value2.value = dayjs(moment(formState.value.starttime).format(('YYYY/MM/DD')), dateFormat) value2.value = dayjs(moment(e.starttime).format(('YYYY/MM/DD')), dateFormat)
value3.value = dayjs(moment(formState.value.starttime).format(('HH:mm')), 'HH:mm') value3.value = dayjs(moment(e.starttime).format(('HH:mm')), 'HH:mm')
value4.value = dayjs(moment(formState.value.expireendtime).format(('YYYY-MM-DD')), dateFormat) value4.value = dayjs(moment(e.expireendtime).format(('YYYY-MM-DD')), dateFormat)
value5.value = dayjs(moment(formState.value.expireendtime).format(('HH:mm')), 'HH:mm') value5.value = dayjs(moment(e.expireendtime).format(('HH:mm')), 'HH:mm')
formState.value.payment = e.payment/100
showModal() showModal()
} }
const onSearch = async () => { const onSearch = async () => {
...@@ -302,13 +303,14 @@ const init = async () => { ...@@ -302,13 +303,14 @@ const init = async () => {
const uid = getUid() const uid = getUid()
const data = await onSelectGoods(uid) const data = await onSelectGoods(uid)
listArray.value = data.data listArray.value = data.data
} }
const onSelectCheckboxValue = (e: any, index: any) => { const onSelectCheckboxValue = (e: any, index: any) => {
checkboxValue.value[index] = e checkboxValue.value[index] = e
} }
const onSelect =(e:any,label:any,index:any)=>{ const onSelect =(e:any,label:any,index:any)=>{
console.log(e,'e',label,index,formState,'formState'); formState.value.markingprice = listArray.value[label.index].price
} }
onMounted(async () => { onMounted(async () => {
onSearch() onSearch()
......
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